Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I have a directory with the following details:

drwxrwxr-x 6 root devs 4.0K Sep  9 14:57 project_dev

Now I want www-data (Apache daemon) to have an access to this directory, so in my mind I am planning to add www-data to group devs. However I fear that I would cause wreckage if I execute this:

usermod -a -G devs www-data

Inputs please.

share|improve this question

You won't break anything, but you might cause a security issue, since anyone accessing the www-data account (php scripts, unpatched, hacked pages, etc.) will get read/write access to everything that the 'devs' group has.

"www-data" already has read access to that folder, try limiting the write access to just the files it really really needs to write to.

share|improve this answer
Appreciate your feedback, I'd think of this approach because I'm about to install WebSVN. That project_dev is a repository. Any suggestions? – Leandro Garcia Sep 9 '12 at 15:29
Can't he just change the group to www-data and add the dev group to www-data to give access to www-data and avoid the security risk? – Choy Sep 9 '12 at 15:41
@Choy: yes, that would work too. But then the devs would have access to all the www-data stuff (which is sometimes OK, sometimes not). Maybe a separate group, and adding the www-data and required devs to it? – mulaz Sep 9 '12 at 16:06

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.