Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's explain that mess, I have some projects in one server under debian 6, each one located at their respective /home/USER with it's respective user. I want the users that login as "project1" not being able to read files under other project folders (/home/project2 ie.). But I want apache to serve each project without permission forbidden.

I can get one thing or the other but not both at the same time. If I block users from reading the others with "chmod 0750 /home/project*" i get a "Forbidden" from apache.

How this could be solved?

share|improve this question
up vote 2 down vote accepted

One way to do it is to change the permissions of your projects to 750 and set the owner to user1:www-data. This way the owner user has full privileges on the folder. The group www-data has read+exec permissions which should be enough to serve contents from that folder.

share|improve this answer
It works! I thought that being the user folder the same group as the other it was the user's group also but it isn't. One user does not belong to the same group of its home folder. Thank you. – Weird May 27 '12 at 0:41

You can either use extended ACLs to grant the user running Apache access, or do the usual and just give o+x,g-rwx and put everyone in the same group.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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