Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3. In order to make a directory and its contents readable by a group, say, 801020, do the following:

Code Block

chgrp -R 801020 directoryname
chmod -R -g+rX directoryname

4. In order to avoid doing this for every file you create, add the following to your profile: This will make sure files that you generate will automatically be group readable.

Code Block

umask 002

You'll also need to change from your default group to the group the client belongs to.

...

5. Alternatively, you can set the group ID on a client's directory, and then set the setgid flag on the directory so that all subdirectories and files created in the directory from that time forward inherit the same group ID:

Code Block

chgrp 801020 directoryname
chmod g+s directoryname

Recursively Sharing Files In A Directory With Your Group

Taken directory from a TACC login tip:

Here's a great way to set permissions recursively to share a directory named projdir with your research group:

Code Block
languagebash
$ lfs find projdir | xargs chmod g+rX

Using lfs is faster and less stressful on Lustre than a recursive chmod. The capital "X" assigns group execute permissions only to files and directories for which the owner
has execute permissions

Finding The Group ID For An Allocation

...