How can I setup a group writeable directory?

Posted by meder on Super User See other posts from Super User or by meder
Published on 2011-01-06T17:49:32Z Indexed on 2011/01/06 17:55 UTC
Read the original article Hit count: 289

Filed under:
|
$ whoami
meder
$ cd /var/www
$ sudo mkdir html
$ sudo groupadd web
$ sudo usermod -a -G web meder
$ sudo usermod -a -G web medertest
$ sudo chown meder:web html
$ sudo chmod -R g+rwx html

The problem is, anytime I create a new file in /var/www/html even though the group is set to web, it is only writeable by the original user.

I was given the advice of setting the umask to be 002 because the default is what causes the problems. But I would have to do this for all users in that group, and as far as I know it would be tedious having all of them modify ~/.bashrc to have umask 002. Even if I can do it myself with a shell command for all of those users, it still seems too tedious.

Can anyone offer any advice on having a group writeable directory?

© Super User or respective owner

Related posts about linux

Related posts about permissions