Wednesday, September 9, 2020

Group access to linux user;

Create linux user 

sudo useradd VJ_test_user


Set Password for the user created

sudo passwd VJ_test_user

> VJ@123


Create a group 

sudo groupadd VJ_test_group


Add users to a group

sudo usermod -a -G VJ_test_group VJ_test_user

sudo usermod -a -G VJ_test_group VJapp


Give group access to the directory

chgrp -R VJ_test_group /home/VJ_test_user


Grant group access 

chmod g+rwX /home/VJ_test_user -R


Change owner of directory:


Change owner and group of directory- 

> chown -r username:groupname <Directory_Location>


No comments: