On Fri, Apr 28, 2023 at 07:06:17PM +0200, Maurizio Caloro wrote:
> f: /var/lib/rancid/routers/configs
> drwxr-xr-x root   root   /
> drwxr-xr-x root   root   var
> drwxr-xr-x root   root   lib
> drwxr-xr-x rancid rancid rancid
> drwxr-x--- rancid rancid routers
> drwxr-x--- rancid rancid configs

The last two directories are missing world +x permission.  This means
the web server process can't touch them -- can't enter them, can't
open files within them, etc.

> # ls -ld / /var /var/lib /var/lib/rancid /var/lib/rancid/routers
> /var/lib/rancid/routers/configs
> drwxr-xr-x 20 root   root   4096 Feb  3 13:55 /
> drwxr-xr-x 13 root   root   4096 Nov  7 20:24 /var
> drwxr-xr-x 31 root   root   4096 Apr 25 18:28 /var/lib
> drwxr-xr-x  7 rancid rancid 4096 Apr 27 18:39 /var/lib/rancid
> drwxr-x---  4 rancid rancid 4096 Apr 27 18:44 /var/lib/rancid/routers
> drwxr-x---  2 rancid rancid 4096 Apr 27 18:44
> /var/lib/rancid/routers/configs

Same result here, just in a slightly different format.  Both commands
that I gave you are equally powerful here.  It's really just a matter
of preference.  The namei one is easier to type, because you don't
have to list out all the subdirectories one by one.  The ls one is
more familiar to most people.

Anyway, you're going to have to figure out the correct way to handle
this.  I'm not familiar with this "rancid" thing, so I don't know why
these directories have restricted permissions, or what the ramifications
would be if you were to add o+x bits to them.

You may need help from someone with rancid knowledge.

Reply via email to