61

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
  • 64,768
  • 7
  • 111
  • 168
John
  • 611
  • 1
  • 5
  • 3

2 Answers2

90

Creating a group

sudo addgroup groupname

Creating a user into this group

sudo adduser username groupname

Permissions Restriction

See this thread for permissions.

user7429642
  • 1,351
  • 7
  • 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