I'm running apache with mod_python, and I'm having trouble reading files from a specific directory. Previously the directory had 0777 permissions but I've decided to change it to 0770 (not quite happy with having other RW access).
So I changed the permissions of the directory and changed its group to "apache" since another user writes information into it (which is also a member of the "apache" group). I've also enabled the Set-group-ID bit since the main group of the user who writes isn't "apache".
When I look at the files I do see that all have the correct permissions and group, but when I try to load a page from the directory I get:
567 dirlist = os.listdir(logroot)
568 dirlist.sort(key=int,reverse=True)
569 for entry in dirlist[0:days]:
dirlist undefined, global os = , os.listdir = , logroot = '/path-to-dir/fix-dir-permissions/Logs/'
type 'exceptions.OSError': [Errno 13] Permission denied:'/path-to-dir/fix-dir-permissions/Logs/'
The Logs
directory has the following permissions:
drwxrws--- 4 john apache 4096 Dec 27 15:59 Logs
What am I doing wrong?