ls -l shows the owner, group, and other mode bits. It does not show the full access control list. If a file has named user or group entries, or if a directory supplies defaults to new children, getfacl gives you the missing context.
Read one path
getfacl --absolute-names -- /srv/reports/monthly.csvThe output begins with file, owner, and group comments. Access entries follow. The familiar user::, group::, and other:: entries correspond to the owner, owning group, and everyone else. Additional user:name: and group:name: entries grant permissions to named principals.12
A trailing + in long ls output usually indicates extended access metadata, but getfacl is the clearer diagnostic view.
Do not overlook the mask
The ACL mask limits the effective permissions of named users, named groups, and the owning group entry. It does not limit the file owner or other entry.1
Try it on a temporary file:
lab=$(mktemp -d)
file="$lab/report"
: > "$file"
chmod 660 "$file"
setfacl -m m::r-- "$file"
getfacl --absolute-names -- "$file"The owning group entry still says rw-, but getfacl annotates its effective permission as read-only because the mask is r--. This is why reading only the group entry can lead to the wrong conclusion.13
Remove the lab with trash "$lab" if trash is installed.
Check parent directory defaults
getfacl --absolute-names -- /srv/reportsEntries beginning with default: are a directory’s default ACL. They do not grant access to the directory itself. Instead, they are inherited as access ACLs by newly created children, subject to the creation mode requested by the program.1
Existing children do not change merely because the parent’s default ACL changes. During diagnosis, compare an old file, a newly created file, and the parent directory.
Remember the path walk
Access to a file also requires search permission on each parent directory. Inspect the whole route when the file ACL appears sufficient:
namei -l /srv/reports/monthly.csvnamei -l shows mode bits and ownership along the path. Run getfacl on any directory where mode bits do not explain the result.
[!CAUTION]
setfaclchanges live access. Use it only after you understand the mask and inheritance effects. Recursive ACL changes can expose data or lock out services across a large tree.3