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

I'm running an Ubuntu server with apache2/mod_mono

Ive got:


The only way I've been able to get this all working is by:

chown -R www-data:www-data /home/user/www

I'd like to be able to connect as 'user' using WinSCP and edit the contents of /home/user/www but I've tried all sorts of user and group permissions and cant get it working. I'm sure there are some basics of permissions that I'm not understanding. How should I be doing this?

share|improve this question
up vote 1 down vote accepted

Add user to the www-data group:

$ useradd -G www-data user

Set proper permissions on the target folder:

$ chown -R user.www-data /home/user/www
$ chmod -R g+w /home/user/www

The two above commands set the file/directory ownership properly and then grant the group owner write permissions.

share|improve this answer
I'd already somehow managed to add the user to www-data group! Thanks – Tim Oct 14 '10 at 13:50

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.