↑ ↓ select, Enter open, Esc close

Grant a user write access with ACLs

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
root@server
setfacl -R -m u:deploy:rwX,d:u:deploy:rwX /var/www/vhosts/example.com/httpdocs

Recursively sets an ACL that allows the user to read and write, plus a default ACL via d: that new files and folders inherit automatically. The capital X grants execute permission only to directories and files that are already executable. Owner and group remain unchanged, which matters on Plesk.

Note: Remove the entry with setfacl -R -x u:BENUTZER,d:u:BENUTZER PFAD. The filesystem must support ACLs, which is the default on ext4.

Also searched as

  • give second user write access linux
  • grant deploy user access to webspace
  • extend permissions without chown
  • set default acl for new files

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.