Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running an Ubuntu server with apache2/mod_mono

Ive got:

/home/user/www

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

1 Answer 1

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

 
discard

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.