I am setting up a webserver with Ubuntu 14.04. I have created a group called webadmins and added relevant users to this group, I also included www-data user as member of this group.

Now I need to give write access webadmins group members. Could you give me the command for this please?

share|improve this question
2  
possible duplicate of How to avoid using sudo when working in /var/www? – muru Aug 15 '15 at 8:19

First you must make the directory owned by webadmins

sudo chown username:groupname /path/to/directory (-R , optional, recursive)

So there are a few ways to do this, but to Just change the groups permissions the easiest is

sudo chmod g=w /path/to/directory (-R , optional, recursive) 

this will make it ONLY have write permissions tho, so you'd probably want

g=rw

If you plan on using linux, you need to learn about chown and chmod, watch some youtube short videos and read some wiki's.

share|improve this answer
    
Yes I got some distance with youtube videos however I couldn't find the way to achieve my request. I just tryed your commands they did not work either. I confirm that www-data and user1 is member of webadmis group however only one of the account able to write to /var/www/html folder. – ITC BNE Aug 15 '15 at 8:41

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.