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...
Asked
Active
Viewed 165 times
2 Answers
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.

Lev Bystritskiy
- 391
-
But after that im switch
someuser
below i can not be used vim to create file in/srv/beta
.
– Uncelvel Feb 16 '16 at 04:08sudo 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.
-
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
-
CHMOD
andCHOWN
will not work as Unix is case sensitive, usechmod
andchown
. – ctrl-alt-delor Jul 14 '16 at 22:13