[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SOLVED (sort of) - Re: OT: Accessing users' pages on Apache



Cameron Hutchison wrote:

Once upon a time Kent West said...
Hubert Chan wrote:
What are your permissions on your home directory?  IIRC, it needs to be
world-executable.  Maybe world-readable too (although I don't think so).

You mean my user's home directory (/home/westk)? In that case, I'll give up playing with Apache.

If you mean my /home directory,

drwxrwsr-x    6 westk    westk        1024 May 27 13:57 /home/

Yes, he meant /home/westk. The permissions must be set such that the
apache process (running as a user other than westk, most likely
"apache") can access the public_html directory. If your home directory
permissions are 700 (drwx------), then apache will not be able to access
your web pages.

It should be sufficient to set permissions to 711 (drwx--x--x). With
these permissions, another user cannot list the contents of your home
directory, but if they know a filename they can try to access it
(permissions on the specific file/directory will then come into play).

If you dont at least open up access permission to your home directory,
you cannot serve up any pages within that hierarchy.


That did it.

But this seems like a fundamental flaw. User's should be restricted (generally speaking) to writing only to their own home directories, so it seems this is the place for them to put their web pages. But opening up their home directories to world execute seems like a bad idea.







Reply to: