16
13
$ 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?
@marco thanks did not know that group info is not updated in the current session... bummer – gabeio – 2015-04-23T00:43:54.027
2Have you tried logging out and then logging again with the user meder? Group information is not updated in the current session. – marco – 2011-01-06T18:52:06.833
@marco - I did
su medertest
andsu meder
like a thousand times. Does that qualify as a log out? – meder omuraliev – 2011-01-06T19:12:22.220