Restricting users to their own home directories / not letting
users view other users files...?
Uwe Laverenz
uwe at laverenz.de
Thu Feb 12 06:07:47 PST 2009
On Wed, Feb 11, 2009 at 11:22:17AM -0500, Keith Palmer wrote:
> I realize I can fix this by setting the permissions on the "/home/shannon"
> directory to 700. *However* then Apache (running as user "www") won't
> display the documents in "/home/shannon/public_html" from
> "http://ip-address/~shannon/", instead returning a "403 Forbidden" error.
I did not see a correct answer to your question so far, so here you are:
- set the permissions to the users homedir to 0700
- run "chmod o+x" on the homedir
this sets the permissions to "drwx-----x" which is exactly what you
want: others can switch to this directory but _not_ read its contents
- change the permissions to "public_html" to whatever you need for
apache (0755 probably)
done.
cu,
Uwe
More information about the freebsd-questions
mailing list