Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Special user permissions for files

Shulou Source: shulou.com Published: 2022-06-01 02:53:55 11月25日 Update

The second book

two。 List of user permissions

1. Definition of permission list

A record table that specifies that a special user has special permissions on a file

two。 Identification of permission list

-rw-rw-r--. The permission bit has a plus sign and the permission list is open.

-the rw-r--r--+ permission is Yes. , permission bit is off

3. View of permission list

Getfacl file

# file: name of the file# file

# owner of owner:root# file

# all groups of group:root# files

User:rw-# file owner permissions

User:test:rw-# special user specified permissions

Group:r--# group permissions

Mask:rw-# permission threshold

Other:r--# other permissions

4. How to set the acl list

Setfacl-m u:username: permission filename

Setfacl-m u:test:rw / mnt/file# specifies that test users can read and write file files

Setfacl-x u:student file# removes student user information from the list

Setfacl-x g:student file# removes student group information from the list

Setfacl-b file # close the list

5.mask permission threshold

If you chmod a file with a permission list, it is likely to modify the mask in the file permission list

Mask is the maximum permission value that a special user can get.

Setfacl-m m: permission filename # to modify the value of the mask

6. Default permissions

Set when we need to create a new file or directory in the specified directory with special permissions for the specified user

Setfacl-m d:u:username: permission filename

The default permissions do not take effect on existing files or on the directory itself

# # Kernel automatic execution cancels x execution permissions of files

# # default has a default effect on the permissions of directories under the directory. First, inherit the default permissions.

Tags: Permissions files users special directories information owners effects maximum kernel name tables Zhongxin Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL macOS Shulou Technology Apple