Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the file extension permission ACL

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to understand the file extension permissions ACL, the content is very detailed, interested friends can refer to, hope to be helpful to you.

File extended permissions ACL

Extended ACL: access control list

ACL (Access Control List) is an access control list. Mainly for a single user, a single file or directory for the detailed setting of rwx permissions. Can be set for users (User), groups (Group), and default attribute masks (umask).

Opening of ACL permission

1. Check whether acl permissions are supported (whether the file system supports ACL permissions):

A.ext4 file system: use dumpe2fs-h / dev/sda3 to view information in superblocks

There is Default mount options: user_xattr acl or query using mount

B.xfs file system: the xfs system seems to have forced ACL permissions on.

two。 Enable acl permissions

a. Temporarily enable: mount-o remount,acl / (remount: remount; [, acl] add acl permission; [/] partition)

b. Permanent enable: edit our boot mount file / etc/fstab

ACL parameter

Getfacl: gets the ACL setting information for a file or directory.

-a,-- access: displays access control lists for files or directories.

-d,-- default: displays the default (default) access control list for files or directories.

-c,-- omit-header: the default access control list is not displayed.

-R,-- recursive: the operation recurses to a subdirectory.

-t,-- tabular: use the list output format to output the ACL setting information.

-n,-- numeric: displays the UID and GID of users and groups in the ACL information.

-p,-- absolute-names:

-v,-- version: displays the version information of the command

-h,-- help: displays command help information.

Setfacl: sets the ACL setting information for a file or directory.

-m,-- modify=acl: modifies the extended ACL setting information of a file or directory.

-M,-- modify-file=file: reads the ACL setting information from a file and uses it as a template to modify the extended ACL setting information of the current file or directory.

-x,-- remove=acl: removes an extended ACL setting information from a file or directory.

-X,-- remove-file=file: reads the ACL setting information from a file and uses it as a template to delete the ACL setting information of the current file or directory.

-b,-- remove-all: delete all extended ACL setting information.

-k,-- remove-default: delete the default acl setting information.

-- set=acl: sets the ACL setting information of the current file.

-- set-file=file: reads the ACL setting information from the file to set the ACL setting information for the current file or directory.

-- mask: recalculates valid permissions, even if ACL mask is explicitly specified.

-n,-- no-mask: do not recalculate valid permissions. Setfacl recalculates ACL mask by default, unless mask is explicitly specified.

-d,-- default: sets the default ACL setting information (valid for directories only).

-R,-- recursive: the operation recurses to all subdirectories and files.

-L,-- logical: tracks symbolic links. By default, only symbolic link files are tracked, skipping the symbolic link directory.

-P,-- physical: skip all symbolic links, including symbolic link files.

-- restore=file: restore backup acl setting information from files (these files can be generated by getfacl-R)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report