Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Included additional information for using chgrp #691

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/workflow_solutions/shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,18 @@ For single files use `chgrp <new-group> <file>`.

To change a directory and all of its contents recursively use `chgrp -hR <new-group> <file>`. The `-h` flag will avoid walking through the targets of symbolic links.

As a best practice, there could also be instances where you will need to verify the parent directory/directories before you make changes, do the following, when a case like this arises;

1. Check that the parent directory/directories have the `setgid` (i.e. `s`) bit in the file permission, when you run the `ls -l <file_or_directory_path>`.

1. If the `setgid` bit is missing, change group ownership of the directory using the below `chgrp` command.

`chgrp <group_name> <directoryname>`

1. We can now apply the `setgid` permission to the directory using this syntax.

`chmod g+s <directoryname>`

<!-- markdownlint-disable MD046 -->
!!! warning

Expand Down