Differences
This shows you the differences between two versions of the page.
Both sides previous 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 [2025/06/11 08:31] (current) – [Fixing file and directory permissions] Add syntax highlighting pedro | ||
---|---|---|---|
Line 122: | Line 122: | ||
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 128: | ||
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 144: | ||
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 | ||
</ | </ |