← All commands
Topic hub Security & Permissions
Windows Linux Security & Permissions Expanded guide File System

Windows cacls / icacls equivalent in Linux

Views and sets fine-grained file permissions beyond the basic owner/group/other model.

Windows cacls / icacls
→
Linux equivalents
Debian/Ubuntu same command
getfacl / setfacl
Fedora same command
getfacl / setfacl
Arch same command
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.

Migration tip: Basic Linux permissions (chmod) cover most needs. For Windows-style fine-grained ACLs, install the <code>acl</code> package and use <code>setfacl</code>.

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.

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 optionUse
getfacl fileShow current ACL for file
setfacl -m u:john:rw fileGive john read+write access
setfacl -m g:devs:rx dirGive devs group read+execute
setfacl -b fileRemove 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.

DistributionPackage manager / baseEquivalent commandDifference 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

Related Security & Permissions commands