I have a situation where I want to prevent users of the system to browse each other's home dirs. So all home dirs have 750 permissions, instead of 755.

Some users have www folders where they host sites, so www-data still needs to have access. So my solution is to make www-data a member of the groups of those users, since in debian each user has its own group.

So if userA is hosting content on /home/userA/www/, then /home/userA will have 750 permissions. And then I do:

adduser www-data userA

Problem is, it does't work. When accessing the sites from a browser I get "Forbidden".

I tried to run su www-data as root, and as www-data I was able to browse the contents of /home/userA/www/. So I don't understand why I still get "Forbidden".

Any ideas?


OK, so /etc/init.d/apache2 restart did the trick!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.