20181125ACL advanced features Default (default)

default:Inheritance (default)

[[emailprotected] ~]# mkdir /111 Create a new folder
[[emailprotected] ~]# setfacl -mu:dong1:rwx /111 empower

[[emailprotected] ~]$ cd /111 Verification
[[emailprotected] 111]$ touch 111.txt

[[emailprotected] ~]# getfacl /111
getfacl: Removing leading’/’ from absolute path names
#file: 111
#owner: root
#group: root
user::rwx
user:dong1:rwx
group::rx
mask::rwx
other::rx

[[emailprotected] ~]# mkdir /111/222 Create a new folder in 111, See whether the permissions can be inherited?
Check the result: I did not inherit the permissions of 111
[[emailprotected] ~]# getfacl /111/222
getfacl: Removing leading’/’ from absolute path names
#file: 111/ 222
#owner: root
#group: root
user::rwx
group::rx
other::rx
If you want to inherit permissions:
[ [emailprotected] ~]# mkdir /111
[[emailprotected] ~]# setfacl -m default:u:dong1:rwx /111
or:[[emailprotected] ~]# setfacl -md: u:dong1:rwx /111
View:
[[emailprotected] ~]# getfacl /111
getfacl: Removing leading’/’ from absolute path names
#file: 111
#owner: root
#group: root
user::rwx
group::rx
other::rx
default:user::rwx
default:user:dong1: rwx
default:group::rx
default:mask::rwx
default:other::rx
only for the future, currently unable to create files:
[[emailprotected] 111] $ cd /111
[[email protected] 111]$ touch 111.txt
touch: Unable to create “111.txt”: insufficient permissions

Only for files after /111 Permission
[[emailprotected] ~]# mkdir /111/222
[[emailprotected] 111]$ cd /111/222
[[emailprotected] 222]$ touch 222.txt

20181125ACL advanced features default( Default)

Leave a Comment

Your email address will not be published.