I have a linux system with apache installed and i store web files in /home/username/www/sitename/htdocs. For this to work my /home/username has read and execute permissions for everyone. I know it's bad idea, but i'm the only user on the system so ... i don't really care and i wouldn't know how else to do it. But the fact is i need to create another user. The problem with that, obviously, is that the new user has access to old user's files. Is there any way i could only allow apaches www-data user and my own user to access /home/username? Here's what i've tried:
i created a group webusers
i added my username and www-data to webusers
i removed rx permissions for everyone on /home/username
rx permissions still remain for the group on /home/username
So shouldn't www-data be able to access /home/username now? It is in the same group as my user. Or is it not that simple? I've read there's primary and secondary groups but i didn't really get the point there ...