This article describe how to share a folder with recursive rw permissions among users of your project. In other words, we want that

  • all sub directories and files must inherit the same group of the parent directory shared_folder, recursively
  • all sub directories and files must have rw permissions, recursively   

Step-by-step guide

This is a two-step procedure. Say we want to create a shared_folder directory on $WORK of a project <MYPRJ>

  1. First make your shared folder writable to the $WORK group and set the group ID (setgid) to your shared folder and

    $ chprj -d <MYPRJ>
    $ cd $WORK
    $ mkdir shared_folder
    $ chmod 770 shared_folder
    $ chmod g+s shared_folder
  2. Then, set the proper acl

    $ setfacl -d -m g::rwx shared_folder/

We can check the settings obtained with the above procedure, with the following command:

$ getfacl shared_folder/
# file: shared_folder/
# owner: myuser
# group: <MYPRJ>
# flags: -s-
user::rwx
group::rwx
other::---
default:user::rwx
default:group::rwx
default:other::---



1 Comment

  1. Unknown User (i.spisso@cineca.it)

    If you want to extend the same permission to the new file(s) and dir that will be created add -R, that it

    chmod -R 770 shared_folder
    chmod -R g+s shared_folder