Re: Apache 2.4, NFS-mounted content, strict permissions & htaccess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 19, 2015 at 12:54 AM, Sander Smeenk <ssmeenk@xxxxxxxxxxxx> wrote:

Apache 2.4/mpm-itk fails to serve sites from this NFS setup. When i move
the site to local storage with exact same permissions it works fine.
Also, if i set +x bits on all parent directores on the NFS setup, it
works.

When you tested with local storage did you also ensure the parent directories did not have the "x" (execute/search) bit set? Because I find it really hard to believe that would work if the web server process is not running as root. In UNIX like operating systems the "x" permission on a directory means you can see a file name in the directory if you know the name. The "r" permission on a directory means you can read (i.e., list) the names in the directory. Try the following test using local and NFS filesystems.

As user1 (e.g., root) create a directory and file. Note that it doesn't have
to be anchored at the root of the filesystem; I did so just for clarity and
brevity:

mkdir -m 555 /test
touch /test/file

As user2 (e.g., your personal account):

ls -l /test/file

As user1 remove the "x" permission from the directory:

chmod 544 /test

As user2 repeat the ls command:

ls -l /test/file

You should get a "permission denied" error.

As user1 restore the "x" permission and remove the "r" permission from the directory:

chmod 511 /test

As user2 repeat the ls command:

ls -l /test/file

It should work this time.

--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux