How can I setup a group writeable directory?
- by meder
$ 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?