Windows cacls / icacls equivalent in Linux
Views and sets fine-grained file permissions beyond the basic owner/group/other model.
cacls / icacls
getfacl / setfacl
getfacl / setfacl
getfacl / setfacl
Overview
What this command does
On Windows, "cacls / icacls" is used to advanced file access control lists (ACL). On Linux, the closest practical mapping shown here is "getfacl / setfacl". Views and sets fine-grained file permissions beyond the basic owner/group/other model. This reference is grouped under Security & Permissions → File System.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows cacls / icacls maps to getfacl / setfacl for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux permissions for Windows users.
Practical tasks
Common use cases
Advanced file access control lists (ACL)
Views and sets fine-grained file permissions beyond the basic owner/group/other model.
getfacl file
Show current ACL for file
setfacl -m u:john:rw file
Give john read+write access
setfacl -m g:devs:rx dir
Give devs group read+execute
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
sudo apt install acl
getfacl /var/www/html
setfacl -m u:john:rw /var/www/html
Walkthrough
Examples with explanations
# Windows: icacls file.txt /grant John:F
# Install ACL tools:
sudo apt install acl
# View ACLs:
getfacl /var/www/html
# Grant a specific user access:
setfacl -m u:john:rw /var/www/html
Reference
Common options and variations
| Command or option | Use |
|---|---|
getfacl file | Show current ACL for file |
setfacl -m u:john:rw file | Give john read+write access |
setfacl -m g:devs:rx dir | Give devs group read+execute |
setfacl -b file | Remove all ACL entries |
setfacl -R -m u:john:rx dir/ | Apply ACL recursively |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "getfacl / setfacl" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | getfacl / setfacl |
Same command on this distribution. |
| Fedora | same command | getfacl / setfacl |
Same command on this distribution. |
| Arch | same command | getfacl / setfacl |
Same command on this distribution. |
Keep learning