Differences
This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
linux_wiki:create_and_manage_access_control_lists_acls [2016/02/29 21:40] billdozor created |
linux_wiki:create_and_manage_access_control_lists_acls [2016/03/03 22:17] billdozor |
||
---|---|---|---|
Line 3: | Line 3: | ||
**General Information** | **General Information** | ||
- | About this page/ | + | Access Control Lists are additional permissions that allow advanced type of access beyond the standard "user, group, others" |
---- | ---- | ||
+ | |||
+ | ===== View ACLs ===== | ||
Show ACL permissions | Show ACL permissions | ||
Line 20: | Line 22: | ||
* The above is a new file created by root, with no extended ACL permissions set | * The above is a new file created by root, with no extended ACL permissions set | ||
* getfacl = get file access control lists | * getfacl = get file access control lists | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Setting ACLs ===== | ||
Set ACL for the user, yoda to give him write permissions | Set ACL for the user, yoda to give him write permissions | ||
Line 40: | Line 46: | ||
* mask = max level permissions for ACLs | * mask = max level permissions for ACLs | ||
+ | \\ | ||
Notice the " | Notice the " | ||
<code bash> | <code bash> | ||
Line 47: | Line 54: | ||
</ | </ | ||
+ | \\ | ||
Update the mask (max ACL permissions) to read | Update the mask (max ACL permissions) to read | ||
<code bash> | <code bash> | ||
Line 63: | Line 71: | ||
* m::r => set mask for all to read permissions. This means that even though yoda has rw, the max anyone can have is read. | * m::r => set mask for all to read permissions. This means that even though yoda has rw, the max anyone can have is read. | ||
+ | \\ | ||
Set ACL for a group | Set ACL for a group | ||
<code bash> | <code bash> | ||
Line 86: | Line 95: | ||
* Note: Default permissions does NOT give those permissions to dir1 itself | * Note: Default permissions does NOT give those permissions to dir1 itself | ||
+ | \\ | ||
Remove default ACLs | Remove default ACLs | ||
<code bash> | <code bash> | ||
Line 92: | Line 102: | ||
* Remove all ACLs (including default): setfacl --remove-all dir | * Remove all ACLs (including default): setfacl --remove-all dir | ||
+ | \\ | ||
Remove a single user's ACL | Remove a single user's ACL | ||
<code bash> | <code bash> | ||
Line 99: | Line 110: | ||
</ | </ | ||
+ | \\ | ||
Copy ACL from file1 and apply it to file2 | Copy ACL from file1 and apply it to file2 | ||
<code bash> | <code bash> |