In Linux, I have the following id
:
uid=1005(username) gid=1005(username) groups=1005(username),33(www-data),1002(git)
I'd like to change my effective gid to git
so that everything I create will belong to gid
group. E.g. touch testfile
gives owner=username group=git
How?
Best Answer
You can change your current group using the newgrp commmand:
Groups can be locked or have a password. See the manpage for more details.