2

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?

muru
  • 197,895
  • 55
  • 485
  • 740
ITC BNE
  • 21

1 Answers1

1

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.

  • 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 08:41