70

I am new to ubuntu server. How can I create a group lets call that group 'mypeople' then add a user to 'mypeople' lets use user 'brad'.

and have 'brad' only access to /var/www/brad/. 'brad' can write,read,execute in his directory and have shell access.

Hennes
  • 65,804
  • 7
  • 115
  • 169
John
  • 701

2 Answers2

98

Creating a group

sudo addgroup groupname

Adding an existing user into this group

sudo adduser username groupname

Permissions Restriction

See this thread for permissions.

user7429642
  • 1,431
  • 8
  • 9
5

**Creating a group **

we can add the group as below, and also you need to add the group id also.

eg - group name - fpsalph,group id - 10000

groupadd -g 10000 fpsalpha

after that, you can check it by this command.

tail /etc/group