I have two conflicting needs. I'd like to serve files with Apache out of /home/steve/public_html/
which according to the documentation I've read, requires me to set a+rwx
on /home/steve/.
I'd also like to use SSH to connect to this account, but if I set my home directory to world-readable, SSH complains (rightly so), and doesn't let me connect.
Is there a way that I can serve files from public_html while still allowing SSH access?
EDIT: After reading the answers and doing a bit of critical thinking, I realized I was asking the wrong question. What I should have been asking was:
- how do I safely develop and test php code in my home directory, when this code requires Apache to write to an SQLite database. The answer, obviously, being: put the database under
/var/www/
and everything else inpublic_html
.
a+rwx
) to/home/steve
means any user canmv /home/steve/.ssh /home/steve/.ssh.old
then create a new/home/steve/.ssh
and correspondingauthorized_keys
. But in that case, checking that steve ownedauthorized_keys
should still be sufficient, so I'm not sure why. – Mikel Jan 20 '11 at 2:01