# Quagga don't have permission on its configuration files



## olivier (Aug 25, 2009)

Hi,

I meet a problem with Quagga (under a NanoBSD):
I can start Quagga once and modify the configurations files using vtysh.
But once I restart my system, Quagga can't start :

```
[root@router]/tmp#/usr/local/etc/rc.d/quagga start
Starting zebra.
vty_read_config: failed to open configuration file /usr/local/etc/quagga/zebra.conf: Permission denied
can't open configuration file [/usr/local/etc/quagga/zebra.conf]
Starting ripd.
vty_read_config: failed to open configuration file /usr/local/etc/quagga/ripd.conf: Permission denied
can't open configuration file [/usr/local/etc/quagga/ripd.conf]
Starting ripngd.
vty_read_config: failed to open configuration file /usr/local/etc/quagga/ripngd.conf: Permission denied
can't open configuration file [/usr/local/etc/quagga/ripngd.conf]
Starting ospfd.
vty_read_config: failed to open configuration file /usr/local/etc/quagga/ospfd.conf: Permission denied
can't open configuration file [/usr/local/etc/quagga/ospfd.conf]
Starting ospf6d.
vty_read_config: failed to open configuration file /usr/local/etc/quagga/ospf6d.conf: Permission denied
can't open configuration file [/usr/local/etc/quagga/ospf6d.conf]
Starting bgpd.
vty_read_config: failed to open configuration file /usr/local/etc/quagga/bgpd.conf: Permission denied
can't open configuration file [/usr/local/etc/quagga/bgpd.conf]
Starting isisd.
vty_read_config: failed to open configuration file /usr/local/etc/quagga/isisd.conf: Permission denied
can't open configuration file [/usr/local/etc/quagga/isisd.conf]
```
But, the permissions of my files are ok:


```
[root@router]/tmp#ll /usr/local/etc/quagga/
total 14
-rw-------  1 quagga  quagga    78B Aug 25 19:18 bgpd.conf
-rw-r--r--  1 quagga  quagga     0B Jul 22 18:37 bgpd.conf.sav
-rw-------  1 quagga  quagga   112B Aug 25 19:18 isisd.conf
-rw-r--r--  1 quagga  quagga     0B Aug 24 19:26 isisd.conf.sav
-rw-------  1 quagga  quagga   104B Aug 25 19:18 ospf6d.conf
-rw-r--r--  1 quagga  quagga     0B Jul 22 18:37 ospf6d.conf.sav
-rw-------  1 quagga  quagga   114B Aug 25 19:18 ospfd.conf
-rw-r--r--  1 quagga  quagga     0B Jul 22 18:37 ospfd.conf.sav
-rw-------  1 quagga  quagga   111B Aug 25 19:18 ripd.conf
-rw-r--r--  1 quagga  quagga     0B Jul 22 18:37 ripd.conf.sav
-rw-------  1 quagga  quagga    78B Aug 25 19:18 ripngd.conf
-rw-r--r--  1 quagga  quagga     0B Jul 22 18:37 ripngd.conf.sav
-rw-------  1 quagga  quagga   165B Aug 25 19:18 zebra.conf
-rw-r--r--  1 quagga  quagga     0B Jul 22 18:37 zebra.conf.sav
```

And even with a [cmd=]chmod -R 777 /usr/local/etc/quagga/[/cmd] I've still have the same problem.

I've compiled Quagga with these options:

```
-DNO_INSTALL_MANPAGES -DWITH_ISISD -DWITH_OSPF_NSSA -DWITH_OSPF_OPAQUE_LSA -DWITH_SNMP -DWITH_TCPSOCKETS -DWITH_DLMALLOC 
-DWITH_VTYSH
```

I've try to "truss" zebra, but I don't find usefull information.

Does anyone have an idea about this problem ?


----------



## Alt (Aug 26, 2009)

Perhaps 'quagga' user does not have a +r or +x permission on a some directory in this path "/usr/local/etc/quagga/"


----------



## olivier (Aug 26, 2009)

This is why I've tried a "chmod -R 777 /usr/local/etc/quagga/".
But no change :-(


----------



## Alt (Aug 26, 2009)

It may be same for  /usr/local/etc/ xD
Anyway, you can try to su to 'quagga' user and travel there and check readability


----------



## olivier (Aug 26, 2009)

Thanks for the tips !
Using su quagga, I've found that quagga user don't have permission to /etc/local (under nanoBSD /usr/local/etc is a symlink to /etc/local) and /etc/local/quagga.
Fixing theses permission solve my Problem: Thanks a lot's!


----------

