Updated: 30 November 2026 · Applies to: acl 2.3.2 on Ubuntu 24.04 and acl 2.4.0 on AlmaLinux 10 (every step tested on both), also Debian 13, Ubuntu 26.04 and Rocky Linux 9 and 10
There are two different errors, and each has its own fix. setfacl: command not found means the small acl package is not installed on your server: install it (Step 2) and the command works at once. setfacl: ... Operation not supported means setfacl is installed, but the place where the file is stored cannot keep ACLs: find out what kind of storage it is (Step 4) and use the fix for that type.
ACL stands for "access control list". With setfacl you give one extra user access to a file or folder without changing its owner or opening it to everyone, and with getfacl you read those rules back. Both commands come from the acl package, which is often left out of minimal server images, cloud images and containers: we found it missing on fresh Ubuntu 24.04 and AlmaLinux 10. The second error is not about the package at all: some file systems, such as /proc, cannot store ACLs, and some disks or shares have them switched off.
Before you start
- Where to type the commands: on your server, not on your own computer. Connect to your VPS or dedicated server with SSH. On Windows, follow How to access your Server or VPS using PuTTY. On a Mac or Linux computer, open the Terminal app and type
ssh root@your-server-ip(put your server's IP address in place ofyour-server-ip). - How to paste: click the Copy button on a command box (on a computer it appears when you move the mouse over the box). In PuTTY, paste with a right click. In a Mac or Linux terminal, paste with Cmd+V or Ctrl+Shift+V. Then press Enter.
- The boxes after "Output:" show what you should see. Do not copy them.
- root or sudo: these steps install software and create a user, so they need root. If you log in as
root, type the commands as shown. If you log in with another user, typesudo -ionce, press Enter and give your password: you are then root until you typeexit. - Which Linux you have: the install command is different on Ubuntu or Debian and on AlmaLinux or Rocky Linux. Check yours with the command below.
grep PRETTY_NAME /etc/os-release
Output:
PRETTY_NAME="Ubuntu 24.04.5 LTS"
Here it is Ubuntu. On an AlmaLinux server the same command shows, for example, PRETTY_NAME="AlmaLinux 10.2 (Lavender Lion)". Use only the commands for your system.
Step 1: Check whether setfacl is installed
setfacl --version
If setfacl is missing, you see a message such as -bash: setfacl: command not found. Go on with Step 2. If you see a version number instead, for example setfacl 2.3.2, the package is already there: skip to Step 4 if your problem is "Operation not supported", or to Step 5 to practise.
Step 2: Install the acl package
On Ubuntu or Debian, first update the list of available packages:
apt update
Then install the package. -y answers "yes" to the question whether to go ahead:
apt install -y acl
On AlmaLinux or Rocky Linux:
dnf install -y acl
The installer prints a few lines about downloading and setting up the package, and you are back at the command line when it is done.
Step 3: Check that it works now
setfacl --version
Output:
setfacl 2.3.2
This is Ubuntu 24.04. On AlmaLinux 10 we saw setfacl 2.4.0. Any version number means the "command not found" error is fixed. The same package also gave you getfacl.
Step 4: Fix "Operation not supported"
This message comes from the file system (the way the disk or share stores files), not from setfacl. You can see it for yourself on /proc, a special folder Linux creates in memory that cannot hold ACLs. This command only tries to change it and fails, so it is harmless:
setfacl -m u:nobody:r /proc/version
Output:
setfacl: /proc/version: Operation not supported
Now find out what kind of file system holds a file. findmnt -T shows the file system for any path; -n leaves out the heading and -o TARGET,FSTYPE shows only where it is mounted and its type:
findmnt -n -o TARGET,FSTYPE -T /proc/version
Output:
/proc proc
(AlmaLinux prints one space between the two words; that makes no difference.) The type is proc, which never supports ACLs. To check the file that gave you the error, run the same command with its full path in place of /proc/version, for example findmnt -n -o TARGET,FSTYPE -T /home. On a normal VPS disk you usually see ext4 (Ubuntu and Debian) or xfs (AlmaLinux and Rocky Linux), and both support ACLs. To see the mount options too, use -o TARGET,FSTYPE,OPTIONS and look for the word noacl.
Then use the fix for the type you found:
- ext4: ACLs are always on with the kernels Ubuntu, Debian, AlmaLinux and Rocky Linux use. Only the old
noaclmount option switched them off, and Linux 6.1 and later no longer accept it (the current ext4 documentation does not list it). On an older kernel (check withuname -r), removenoaclfrom that disk's line in/etc/fstaband mount it again withmount -o remount,acl /data(put your mount point in place of/data). On a current kernel, ext4 is not the cause. - xfs: ACL support is always on and xfs has no
aclornoacloption. If an xfs disk refuses to mount after someone addednoacl, see XFS Will Not Mount With the noacl Option: Cause and Fix. - btrfs: ACLs are on by default; according to the btrfs documentation, the
noaclmount option turns them off. Remove it from/etc/fstaband mount the disk again. - tmpfs (
/dev/shmand on some systems/tmp): ACLs work; setfacl succeeded on/dev/shmin our test. - zfs: according to OpenZFS, the
acltypeproperty isoffby default on Linux. Turn it on for one dataset withzfs set acltype=posix pool/dataset(your pool and dataset name); OpenZFS also recommendsxattr=sawith it. - nfs4 (a network share): NFS version 4 uses its own ACL format. Install the
nfs4-acl-toolspackage and usenfs4_setfaclandnfs4_getfaclinstead. - vfat or exfat (USB sticks, some external disks): these have no Linux owners and no ACLs. Set access when mounting with the
uid=,gid=andumask=options. - proc or sysfs (
/procand/sys): ACLs are not possible there. Choose a normal folder instead.
Inside a Docker or Podman container, setfacl works on the container's own files (type overlay) in our tests; a folder mounted into a container follows the rules of the disk it comes from.
Step 5: Make a practice folder, a file and a second user
Now try ACLs on something safe. Make a practice folder in /srv (a folder every Linux server has; another user cannot get into root's own home folder) and go into it:
mkdir /srv/acl-practice
cd /srv/acl-practice
Create a small file. Copy the whole box below, including the last line EOF, paste it and press Enter. cat > notes.txt writes the lines that follow into a new file, and EOF marks where the file ends:
cat > notes.txt <<'EOF' Hello from the practice file. EOF
If you prefer an editor, type nano notes.txt, type the line, then press Ctrl+O and Enter to save and Ctrl+X to close (more in Nano Editor in Linux: Save, Exit, Delete Lines and Shortcuts).
Make the file private, so only its owner (root) can read it, and look at it. 600 means "owner can read and write, nobody else can do anything":
chmod 600 notes.txt
ls -l notes.txt
Output:
-rw------- 1 root root 30 Nov 30 08:01 notes.txt
The date and time will be yours. Now create a practice user called alice. -m also creates her home folder:
useradd -m alice
There is no output when it works. If you see useradd: user 'alice' already exists, that name is taken on your server: use another name, such as alice2, in all the commands below.
Step 6: Check that alice cannot read the file yet
su alice -c '...' runs one command as alice. Because you are root, it does not ask for a password:
su alice -c 'cat /srv/acl-practice/notes.txt'
Output:
cat: /srv/acl-practice/notes.txt: Permission denied
That is what we expect: the file is private.
Step 7: Give alice read access with setfacl
-m means "modify the ACL", and u:alice:r means "user alice may read". Use rw for read and write, or rwx on a folder so she can also go into it:
setfacl -m u:alice:r notes.txt
There is no output when it works. Read the rules back with getfacl:
getfacl notes.txt
Output:
# file: notes.txt # owner: root # group: root user::rw- user:alice:r-- group::--- mask::r-- other::---
How to read it: user::rw- is the owner (root), user:alice:r-- is the new rule for alice, and other::--- means everyone else still has no access. mask is the most any extra user or group can get; setfacl sets it for you. Now look at the file again:
ls -l notes.txt
Output:
-rw-r-----+ 1 root root 30 Nov 30 08:01 notes.txt
The + at the end of the permissions tells you the file has an ACL. Always use getfacl to see who has access, because ls -l alone does not show alice.
Step 8: Check that alice can read it now
su alice -c 'cat /srv/acl-practice/notes.txt'
Output:
Hello from the practice file.
Alice can read the file, while it is still owned by root and still closed to everyone else.
Step 9: Take the access away again
-x removes one rule:
setfacl -x u:alice notes.txt
su alice -c 'cat /srv/acl-practice/notes.txt'
Output:
cat: /srv/acl-practice/notes.txt: Permission denied
To remove every ACL rule from a file in one go, use -b. Afterwards ls -l shows no + any more:
setfacl -b notes.txt
ls -l notes.txt
Output:
-rw------- 1 root root 30 Nov 30 08:01 notes.txt
To use this on your own files, put your own user and path in place of alice and notes.txt. For shared folders, the -R option (every file and folder inside) and default ACLs for new files, see Linux ACLs: Set Access Control Lists with setfacl and getfacl.
Step 10: Remove the practice folder and user
Caution: check that you type exactly /srv/acl-practice and alice; rm -r deletes without asking, and userdel -r also deletes that user's home folder. First leave the folder:
cd ~
rm -r /srv/acl-practice
userdel -r alice
If userdel prints userdel: alice mail spool (/var/mail/alice) not found, that is only a note: the user has still been removed.
If it does not work
E: Unable to locate package acl: the package list on Ubuntu or Debian is empty or old. Runapt update, thenapt install -y aclagain.apt: command not foundordnf: command not found: you used the install command for the other kind of Linux. Check which Linux you have (Before you start) and use the other command.Unable to acquire the dpkg frontend lock ..., are you root?(Ubuntu or Debian) orThis command has to be run with superuser privileges(AlmaLinux or Rocky Linux): you are not root. Typesudo -ifirst, or putsudoand a space in front of the command.setfacl: notes.txt: Operation not permitted: only the owner of a file, or root, can change its ACL. Run the command as root.setfacl: Option -m: Invalid argument near character 3: the user or group in the rule does not exist (character 3 is where the name starts inu:alice:r). Check the spelling, or create the user first as in Step 5.setfacl: nots.txt: No such file or directory: the file name is wrong or you are in another folder. Typepwdto see where you are andlsto see the files there. Linux seesNotes.txtandnotes.txtas two different names.getfacl: Removing leading '/' from absolute path names: only a note when you give getfacl a full path; the rules below it are correct.- alice still gets
Permission deniedafter Step 7: a user also needs access to every folder on the way to the file. Root's home folder (/root) is closed to other users, which is why this guide uses/srv. For a folder, givextoo, for examplesetfacl -m u:alice:rx /srv/acl-practice. - After pasting the
cat > notes.txtbox, nothing happens and the line starts with>: the last lineEOFwas not copied. TypeEOFand press Enter. su: command not found: very small container images can leave it out. On a normal server it is part of the system; in a container, install theutil-linuxpackage.
Still stuck? Open a ticket with the command you typed and the message you saw, and our team will help.
macOS and ordinary permissions
macOS has no setfacl: it sets ACLs with chmod +a, for example chmod +a "admin allow write" file1, and shows them with ls -le. For ordinary Linux permissions and owners, see chmod 755, 644 and 600 Explained: rwxr-xr-x Permission Codes and Change File and Folder Ownership in Linux (chown, chgrp).
Official documentation: setfacl manual and getfacl manual.