[Sussex] permission problem with apache2/php

Tony Austin tony at gigaday.com
Tue Jan 6 17:35:53 UTC 2004


I am trying to use PHP opendir() function to access a directory in the
filesystem but I get "Warning: opendir(/var/spool/mail/billy): failed to
open dir: Permission denied"

the directory in question is:-

#ls
drwxr-x---    8 billy    sm_billy     4096 Dec  3 12:19 billy

I have made user apache a member of group sm_billy in /etc/group:-

sm_billy:x:2001:apache

If I change the permissions to drwxr-xr-x, I can open the directory, but I
want to make it work without opening the permissions up to everyone.

I am runing apache2 and ps aux shows it to be running as user apache.

Anyone any ideas?  This doesn't look like to should be difficult at all.

Regards.

Tony Austin
Gigaday Computing Limited
http://www.gigaday.com
tony at gigaday.com



"I mean, there needs to be a wholesale effort against racial profiling, which is illiterate children."

George W. Bush
October 11, 2000
Comment made during presidential debate.




More information about the Sussex mailing list