I have a folder named Dog
with these permissions:
dr--r-- 2 rich boys 4096
What is the shell command for it
I have a folder named Dog
with these permissions:
dr--r-- 2 rich boys 4096
What is the shell command for it
The command is:
chmod g+x Dog
For opening the folder, you need the execute permission. (When used on regular files, the same execute permission allows running them.) This command simply sets it to the group without touching other permissions.
To give all rights (read, write and execute) to the owner and group; and no rights to others, run this command:
sudo chmod -R 750 ./Dog
Example:
cd /tmp
mkdir Dog
ll | grep Dog
drwxr--r-- 2 subroot subroot 4096 Mar 28 13:49 Dog/
sudo chmod -R 750 ./Dog
ll | grep Dog
drwxrw---- 2 subroot subroot 4096 Mar 28 13:49 Dog/
770
recursively. Among others, it means setting the execute permission for all regular files (in addition to folders) which is likely not desired.
– Melebius
Apr 02 '19 at 08:32