Skip to main content
DARKPC.NET

Review ACLs and Default Permissions on a Shared Lab Folder

Use a disposable directory to distinguish inherited default entries from access entries on an existing file.

Difficulty Intermediate

Prerequisites

Use Linux with getfacl and setfacl and a filesystem that supports POSIX ACLs. Make a fresh local directory you own. Use synthetic files so this exercise cannot change someone else's access.

Inspect before and after inheritance

mkdir acl-practice
cd acl-practice
mkdir shared
touch shared/before
setfacl -m d:u::rwx,d:g::r-x,d:o::--- shared
touch shared/after
getfacl -p shared shared/before shared/after

The default entries on the directory act as a template for later children. The before file was created without that template. The after file's permissions are also limited by its requested creation mode, which is why a regular file need not inherit an execute bit.

Interpret the effective result

Read the owner, group and other entries separately. When a mask entry is present, group-class entries are limited by it. Evaluate access using the actual file and directory path. Search permission on a containing directory can affect whether a user can reach an otherwise readable file.

Troubleshooting and practice

If setfacl reports unsupported operation, move the lab to a supported local filesystem. Before changing real shared permissions, inventory existing access and obtain the owner or administrator's approval. Create a child directory after the change and compare its inherited access and default entries with the regular file's. Document which comparison changed solely because of creation timing.

References and related reading