Tag: setfacl

  • setfacl

    The setfacl utility sets Access Control Lists (ACLs) of files and directories.

    To install setfacl on Ubuntu/Debian, run

    apt install acl
    

    Here is an example, where we create 2 users, one user will be given access to folder inside another users home directory.

    useradd -m --shell /bin/bash  user1
    useradd -m --shell /bin/bash  user2
    su - user1
    mkdir share
    setfacl -m u:user2:rwx share
    

    in setfacl, -m option is used to modify. u specify user, if you need to set acl for a group, use g instead of u.

    See Linux Commands