Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| habrok:data_management:sharing_data [2025/03/07 16:10] – Add Fokke's expanded shared dir docs pedro | habrok:data_management:sharing_data [2026/06/19 11:09] (current) – [File system access control lists for read-only groups] fokke | ||
|---|---|---|---|
| Line 66: | Line 66: | ||
| The first set of '' | The first set of '' | ||
| - | Note that all top level directories for private and group directories on the cluster are set to be unreadable and unwritable by anybody except the group, which means that the files and directories inside can only be accessed by group members. This even though the files inside may have read, write or execute permissions for " | + | **Note that all top level directories for private and group directories on the cluster are set to be unreadable and unwritable by anybody except the group, which means that the files and directories inside can only be accessed by group members.** This even though the files inside may have read, write or execute permissions for " |
| + | |||
| + | For giving certain users read-only access to data we can make use of ACLs to allow a specific group access to a directory. See below for more details. | ||
| Line 122: | Line 124: | ||
| When permissions in a group directory are wrong, the person owning the files can fix these using the '' | When permissions in a group directory are wrong, the person owning the files can fix these using the '' | ||
| - | < | + | < |
| chmod g+rwX file_or_directory | chmod g+rwX file_or_directory | ||
| </ | </ | ||
| Line 128: | Line 130: | ||
| If you want to change the permission for a directory, including all files and subdirectories inside, one can add the '' | If you want to change the permission for a directory, including all files and subdirectories inside, one can add the '' | ||
| - | < | + | < |
| chmod -R g+rwX directory_name | chmod -R g+rwX directory_name | ||
| </ | </ | ||
| To prevent new files from being owned by the private group of the creator the sgid bit must be set on directories. This can be done using: | To prevent new files from being owned by the private group of the creator the sgid bit must be set on directories. This can be done using: | ||
| - | < | + | < |
| chmod g+s directory_name | chmod g+s directory_name | ||
| </ | </ | ||
| Since this sgid bit should not be used on files, we cannot use the '' | Since this sgid bit should not be used on files, we cannot use the '' | ||
| - | < | + | < |
| find . -type d -exec chmod g+s {} \; | find . -type d -exec chmod g+s {} \; | ||
| </ | </ | ||
| Line 144: | Line 146: | ||
| Finally giving other groups read and execute access can be achieved using: | Finally giving other groups read and execute access can be achieved using: | ||
| - | < | + | < |
| chmod o+rX file_or_directory | chmod o+rX file_or_directory | ||
| </ | </ | ||
| Line 150: | Line 152: | ||
| - | ==== File system access control lists ===== | + | ==== File system access control lists for read-only groups |
| - | The permission system described above can only handle a single user and group. If multiple groups need access to data, file system access control lists (ACLs) must be used. These give an additional set of controls on the access rights of files and directories. | + | The permission system described above can only handle a single user or group. If multiple groups need access to data, file system access control lists (ACLs) must be used. These give an additional set of controls on the access rights of files and directories. |
| Setting the correct rights on the top level group directory, using an ACL for the read-only group, is sufficient to prevent the other cluster users from accessing the files and directories inside. Because the ACL system is quite complex, it is better to manage the rights for the other read-only group using the standard permissions for " | Setting the correct rights on the top level group directory, using an ACL for the read-only group, is sufficient to prevent the other cluster users from accessing the files and directories inside. Because the ACL system is quite complex, it is better to manage the rights for the other read-only group using the standard permissions for " | ||