Adding/permitting "staff" to read/write in folder

For some reason, there isn’t "staff" user group on a folder that I just created.
How do I add/permit "staff" user group to a folder that I just created?

This post, seems to suggest to type this in terminal:

sudo chgrp -R staff ./folderName
  1. Can the command work if I don’t use the "-R"? I don’t really want it to apply to the subsequent folders underneath it.
  2. Also, this reddit post, suggest that I need to also try this before:
sudo chown <owner's username> ./folderName

I thought "chown" is change owner? Which user do I need to change to? what should be <owner’s username>?

Kindly please be patient and guide me. I’m very new to this unix command. I just want to make sure that I’m doing the right thing before I stuffed up.

Asked By: Hadi Amrat

||

You want to change the group of a single directory:

chgrp staff ./directoryName

Remember that all commands come with documentation, so man chgrp can help to confirm this.

Answered By: roaima
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.