Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9

To give one user read and write access to a folder they do not own, use a group or an access control list (ACL). Example: user alice, folder /shares/project1/reports. Works on Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9.

Method 1: a shared group (simple, standard)

groupadd project1
usermod -aG project1 alice
chgrp -R project1 /shares/project1/reports
chmod -R g+rwX /shares/project1/reports
chmod g+s /shares/project1/reports     # new files get the group automatically

Alice must log out and in again for the new group to apply. Check with id alice.

Method 2: ACL (for one user, without changing groups)

setfacl -R -m u:alice:rwX /shares/project1/reports
setfacl -R -d -m u:alice:rwX /shares/project1/reports   # default ACL for new files
getfacl /shares/project1/reports

A + at the end of the permissions in ls -l shows that an ACL is set. Remove it with setfacl -x u:alice /shares/project1/reports.

Note: Alice also needs execute (x) permission on every parent folder to reach the directory. If setfacl reports "Operation not supported", see "Solution for setfacl: “Operation not supported” in Linux Servers".

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket