Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

ubuntu 9.04, user luca wants to access the /var/www directory.

the directory is owned by user root, group root

I changed the group ownership to www-data (sudo chgrp -R www-data /var/www/) and added write privileges to that group (sudo chmod -R g+w /var/www), and added luca to that group (sudo adduser luca www-data).

Now, why can't luca still write to /var/www? It should be able to, right?

in /etc/group we have: "www-data:x:33:luca"

permissions for /var/www are: "drwxrwxr-x 2 root www-data 4096 Feb 26 15:35 www"

share|improve this question
1  
Works for me. Maybe luca has to relogin? –  Daniel Feb 26 '11 at 12:44
    
Yes I forget to accept answers.. I'll check the others, too. Anyway, I had to relogin! That's odd.. I thought the effects were instantaneous... –  luca Feb 26 '11 at 17:49
    
Since my comment was the missing piece in the puzzle, I added it to my answer, so it might be of help for others. (And you can accept this answer ;). –  Daniel Feb 26 '11 at 18:57
add comment

1 Answer

You add write privilegues with +w, not +r.

sudo chmod -R g+w /var/www 

And luca has to relogin to have the group assignment changes take effect.

share|improve this answer
    
sorry that was a typo –  luca Feb 26 '11 at 17:47
add comment

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.