You are not logged in.
Is there any way to have an Apache DocumentRoot on a path without granting read permissions for every directory along that path? I have a few local repos in my home directory that I would like to host on a local Apache server but I want to keep my home dir set to 700. From what I can tell, through both searching and experimenting, the answer is no, but I'd like to get confirmation before I abandon the idea entirely and settle for another setup.
Thanks.
Last edited by Xyne (2009-01-08 18:07:04)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
No. It's just another unix user. When you can't read a directory, you can't read anything that's in subdirs
Offline
Thanks for the reply, rine.
Is there any way to trick the system using links so that I can keep the files where they are without opening up permissions and without copying them somewhere else? Maybe some clever use of a loop device could do it.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
The intervening directories don't need read permission. They do need execute permission. Execute permissions on a directory means you can cd "through" it to subdirs.
And yes, you could also have root rebind the directory in question to someplace else in the filesystem where there are no intervening directories. You'd do something like this:
sudo mount -bind old/dir/with/many/intervening/dirs/that/only/root/can/read /mnt/newdir
/mnt/newdir has to already exist. Once you do this, your Apache process only needs read/execute permissions on the /mnt/newdir.
Offline
Thanks Profjim.
That's exactly what I ended up doing but I forgot to come back and mark the thread as solved. I also found the "clever use of a loop device" that I asked about before:
http://aur.archlinux.org/packages.php?ID=22920
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline