My Apache runs as user "nobody", so whatever user your Apache runs as will need "r"ead access to the file you're trying to open. I'M NOT CERTAIN about this, but I think that if you want to grant the webserver(cgi script) read access to a file, and the absolute path to the file is
/path/to/read_file.html
then
directory 'path' needs to grant read and execute privs
to the webserver user, and
directory 'to' needs to grant read and execute privs
to the webserver user, and
file read_file.html needs to grant read privs to the
webserver user.
I think(?) the directories need to grant 'execute' privs to enable descending into those directories. On my system I tried this with 'root' owner and 'root' group owning all files and directorys under /path - so to allow webserver user "nobody" to be able to read /path/to/read_file.html, I had to do
chmod o+rx /path
chmod o+rx /path/to
chmod o+r /path/to/read_file.html
HTH. |