Re: OT: Accessing users' pages on Apache
Once upon a time Kent West said...
> Hubert Chan wrote:
>
> >>>>>>"Kent" == Kent West <westk@acu.edu> writes:
> >>>>>>
> >>>>>>
> >
> >Kent> Yeah, it's a typo in the email. The directory is actually
> >Kent> /home/westk/public_html, as written (correctly) earlier in the
> >Kent> email. And the permissions are:
> >
> >Kent> westk03[westk]:/home/westk> ls -ld public_html/
> >Kent> drwxr-xr-x 2 westk westk 1024 Sep 13 01:32 public_html/
> >
> >Kent> westk03[westk]:/home/westk> ls -l public_html/
> >Kent> total 9
> >Kent> -rw-r--r-- 1 westk westk 8647 Sep 13 00:42 index.html
> >
> >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.
Reply to: