Skip to content

Commit

Permalink
Add note about use of chown to change both user and group
Browse files Browse the repository at this point in the history
  • Loading branch information
joolswills committed Sep 19, 2022
1 parent 2a1b2c2 commit 7a6fe67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/Shell-Style-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ if [[ "${my_var}" ]]; then
fi
```

### Changing user and group ownership of files

Use `chown $user: [PATH]` instead of `chown $user:$user [PATH]` - the empty group parameter will cause chown to use the users login group. This resolves issues on systems where the user doesn't have their own group (eg. where all users are in a `users` group).


## Naming Conventions

### Function Names
Expand Down

0 comments on commit 7a6fe67

Please sign in to comment.