Under Linux, can a certain folder be authorized to a certain user or a certain group separately? Other users or groups have no permissions on the folder, and the ownership of the folder remains unchanged?
For example,
has the folder test1
The permission is drwxr-xr-x and the owner is A
A wants B to have the same permissions on the folder, and other users do not have the same permissions. The owner of the folder is still A
How to do it from the command line? I'm a noob, thanks for the advice.
世界只因有你2017-06-24 09:44:43
Set the group permissions to be the same as the owner
Add B to A’s group
漂亮男人2017-06-24 09:44:43
If you want two users to have the same permissions, you first need to modify the folder permissions chmod 775 test1, and then change the group of B to the group of A or add B to the group of A. The usage is as follows:
usermod -g group loginname
Forcibly set the group a user belongs to
usermod -G groups loginname
Change a user to group(s)
usermod -a -G groups loginname
Add the user to a certain group(s)
仅有的幸福2017-06-24 09:44:43
Just use acl.
It seems to be written like thissetfacl -m user:B:rwx test1