This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
howto:umask [2019/03/07 17:11] wikiadmin created |
howto:umask [2022/03/18 12:12] (current) wikiadmin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======umask====== | ======umask====== | ||
| - | The CHPC cluster uses CentOS as its operating system and follows the user private group scheme | + | The CHPC cluster uses [[quick:os|CentOS]] as its operating system and follows the user private group convention |
| + | |||
| + | =====Default umask===== | ||
| + | |||
| + | The default umask is set by the '' | ||
| + | |||
| + | This is needed for shared groups (not your private user group) where all members of the group need write access. | ||
| + | |||
| + | =====Checking your current umask===== | ||
| + | |||
| + | Simply run the command '' | ||
| + | |||
| + | umask | ||
| + | |||
| + | and your current umask setting will be displayed: | ||
| + | |||
| + | 002 | ||
| + | |||
| + | To change it, run the umask command with the desired umask as the sole argument: | ||
| + | |||
| + | umask 022 | ||
| + | |||
| + | And you can confirm this by running '' | ||
| + | |||
| + | =====CHPC Standard===== | ||
| + | |||
| + | The CHPC departs from the user private convention in one important way. The convention would normally only specify that the user is a member of the user's private group. | ||
| + | |||
| + | So, instead of | ||
| + | |||
| + | auser: | ||
| + | |||
| + | where there is no user in the group, we have | ||
| + | |||
| + | auser: | ||
| + | |||
| + | where '' | ||
| + | |||
| + | This is to allow our staff to have access to your files to help you with technical issues. | ||
| + | |||
| + | =====Disabling write access===== | ||
| + | |||
| + | If you want to remove the '' | ||
| + | |||
| + | ====Step 1: umask==== | ||
| + | |||
| + | Edit your '' | ||
| + | |||
| + | umask 0022 | ||
| + | |||
| + | at the end of the file. Save it. Now when you log in next time your umask will block '' | ||
| + | |||
| + | |||
| + | ====Step 2: remove w access from all files and directories==== | ||
| + | |||
| + | Warning: this can take a long time if you have a lot of files so first launch an interactive session before running these commands. | ||
| + | |||
| + | qsub -I | ||
| + | |||
| + | Use the '' | ||
| + | |||
| + | find . -exec chmod g-w \{\} \; | ||
| Line 9: | Line 71: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | |||
| + | |||
| + | ======Shared Group Directory====== | ||
| + | |||
| + | The above is used to share a directory on the cluster amongst the members of a CHPC research programme, also known as a project. | ||
| + | |||
| + | The PI of a project can request a Linux group be created on the cluster for their programme, using the short name, also known as the project name. This is the same project identifier used with job scripts to in | ||
| + | |||
| + | The PI of a project can further apply for a shared group directory on ''/ | ||
| + | |||
| + | |||