commands
setfacl — modify access control lists
Changes ACLs of authorized files. -m modifies entries; -x removes selected entries; -n suppresses automatic mask recalculation. A supplied explicit mask can restrict named-user and group-class entries. Use a disposable fixture, inspect before/after; tool unavailable locally. Example assumes a fresh permissions lab fixture.
Formal Syntax & Structure
linux syntaxlinux
setfacl [OPTION] FILE...Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -m | option | modify entries |
| -x | option | remove entries |
| -n | option | do not recalculate mask |
| FILE | operand | fixture path |
Return Value
exit status and output
Changes ACLs of authorized files. -m modifies entries; -x removes selected entries; -n suppresses automatic mask recalculation. A supplied explicit mask can restrict named-user and group-class entries. Use a disposable fixture, inspect before/after; tool unavailable locally.
Working Example
Example Snippetlinux
setfacl -m "u:$(id -u):r--,m::---" report.txtgetfacl -c -- report.txt