Home > OS >  Bosses, user belongs to group topics, strives for the answer
Bosses, user belongs to group topics, strives for the answer

Time:11-25

1. Copy the file/etc/fstab to/home/TMP directory, and in accordance with the requirements for the following configuration/home/TMP/fstab file permissions:
This file belongs to artificial qwe
The file's group for JWTS
The file to any person not execute permission
Apple users have read/write permissions on this file
User banaba can neither read nor write to this file, all other users (including the current existing users and create future user) have read permissions on the file

CodePudding user response:

1,
Cp/etc/fstab/home/TMP
2, the file belongs to artificial qwe; The file's group for JWTS
Chown qwe. JWTS/home/TMP/fstab
3, the file to any person not execute permission
Chmod a - x/home/TMP/fstab
Behind a little dizzy, didn't understand what to do

CodePudding user response:

Getfacl/home/TMP/fstab check file permissions, user for themselves, group is subordinate to the group, the other for other users,
To meet the requirements of your apple users and banaba, something like this:
# owner: qwe
# group: JWTS
User: : rw -
Group: : rw -
Other: : -- -- --

Command: chown qwe: JWTS/home/TMP/fstab
Chmod 660/home/TMP/fstab

New or other user of the file are not read and write and execute permissions, if you need to read and write permissions, will receive user join JWTS group can read and write permissions, namely the apple for JWTS group, banaba does not belong to JWTS group,

CodePudding user response:

refer to the building of small white to white reply:
1. Copy the file/etc/fstab to/home/TMP directory, and in accordance with the requirements for the following configuration/home/TMP/fstab file permissions:
This file belongs to artificial qwe
The file's group for JWTS
The file to any person not execute permission
Apple users have read/write permissions on this file
User banaba can neither read nor write to this file, all other users (including the current existing users and create future user) have read permissions on the file

A,/home/TMP/fstab file set permissions to 644. This setting to satisfy "all other users (including the current existing users and create future user) have read permissions on the file"
Two, modify the owner and group, chown qwe. JWTS/home/TMP/fstab
Three, apple authorized, speaking, reading and writing, the use of setfacl -m user: apple: rw -/home/TMP/fstab
Four, give a banaba authorization is disabled, the use of setfacl -m user: banaba: -/home/TMP/fstab