-1

I have a Folder in /srv/beta in Server Ubuntu 14.04 to upload source code. How can i set permision all user in dev-team alow all permision only this folder like vim, upload, .... Tks...

Uncelvel
  • 345

2 Answers2

0

Create a group dev-team groupadd dev-team. Add users to that group usermod -G <somegroup>,dev-team <username> Then set an owner to your folder chown someuser:dev-team /srv/beta and chmod 660 /srv/beta so anyone in group dev-team can read and write there.

  • But after that im switch someuser below i can not be used vim to create file in /srv/beta .
    sudo chown user2:devteam /srv/beta/
    sudo chown user3:devteam /srv/beta/
    sudo chmod 660 /srv/beta/```
    Only User 3 can used vim cli to write file in this folder.
    
    – Uncelvel Feb 16 '16 at 04:08
  • Any user in group dev-team (you can add user to group with usermod -G) is allowed to create files in that directory. No need to change owner of a directory. – Lev Bystritskiy Feb 16 '16 at 19:58
0

You can use CHMOD command for changing the rights or permissions for the folder & CHOWN command for changing the ownership.

For changing the ownership you need to use sudo from root to yourself.

Here is the syntax

To change the ownership for the folder alone.

sudo chown <username>:<groupname> <foldername>

To change the ownership to the folder recursively for all the files and folders inside the folder.

sudo chown -R <username>:<groupname> <foldername>
ramp
  • 741