[X Servers] ~/Sites Apache permission denied problem on 10.2.2 server

Peter C.S. Adams adamsp at cs.umb.edu
Tue Nov 26 06:32:12 PST 2002


Thus spake R. Hannes Niedner <hannes.niedner at gmx.net>, circa 11/25/2002:
> I thought this would be setup automatically and the httpd.conf seems to load
> the necessary module, the permission on the ~/Sites folders including the
> content is 711. I have it working for 2 users but not for the rest and the
> only difference was that I setup these two user as administrators when
> creating their accounts.

That's a pretty significant difference. 711 means read-write-execute for the
file's owner, execute only for anyone else. A guest (i.e. web surfer) does
not have read access to the files. What you want is 755. The 5 gives surfers
read access to the files.

Unix file permissions are expressed as numbers like 755, 644, 777, etc. The
first number is for the owner, the second is for the group, and the third
for everyone, or world" (hence the expression "world readable.") Each number
is made up of three binary digits representing read, write, and execute in
the 4 (2^2), 2 (2^1), and 1 (2^0) positions -- the binary equivalents of the
100s place, tens place, and ones place. So to five everyone read (but not
write) access, you would use:

4 + 0 + 1 = 5

That's a one in the fours place for "yes" to read access, zero in the twos
place for "no" to write access, and one in the ones place for "yes" to
execute access. Other examples:

4 + 2 + 1 = 7 (full access
0 + 2 + 0 = 2 (write only "drop box")
4 + 0 + 0 = 4 (read only)
4 + 2 + 0 = 6 (read/write, no execute)

I can't guarantee that's your only problem, but it's enough to prevent use
of the web files. (That's not an Apache issue, BTW; it's true of ANY
application trying to access the files.)

peter



More information about the X-Servers mailing list