Linux – chown directory for multiple users

Create a new group for users (run commands with root rights):


groupadd testgroup
gpasswd -a user1 testgroup
gpasswd -a user2 testgroup
gpasswd -a user3 testgroup
...

Make that group the group owner of the directory (with root rights):


chown -R user1:testgroup /your/directory

Make the group writeable (with root rights):


chmod -R g+w /your/directory

Leave a Reply

Your email address will not be published. Required fields are marked *