0

I have a folder named Dog with these permissions:

dr--r-- 2 rich boys 4096 

What is the shell command for it

Ahhhhh
  • 59

2 Answers2

4

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.

Further reading

Melebius
  • 11,750
-1

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/
Parto
  • 15,647