Friday, March 29, 2013

Permissions problems when using UserDir mod with Apache2

I have had trouble in the past getting Apache to work properly with the UserDir mod. I just installed a new server and had to solve the problem again. In the past I set ww-data (Apache's user) as the group owner for all user's home folders as well as public_html, which is a pain and feels wrong somehow.

Turns out the issue is that Apache needs executable access on all parent folders at the "everyone" level.

So anyway, the following command did the trick by setting the x bit at all levels on the home directories.

# chmod 711 /home/*

The downside of course is that someone can run applications in any other user's home folder if they know the name of the program and where it is stored.
This forum exchange tipped me off to the solution.

No comments:

Post a Comment