Ubuntu: CHMOD Folder + subfolder + subfolder etc



Question:

I've been overlooking this problem for several hours and I'm starting to get crazy. I have a few folders sharing with users. When setting up the permissions the folders are being displayed ok, but can't acces the subfolders (or see the content).

What I've been trying:

chmod -R 770 test  

As I said, I can acces the content of the folder test, but can't acces test > test 1 > test 2 >. How do I apply these settings to all enclosed folders and files?

Kind regards,

[EDIT] When doing chmod -R 770 test I get the following output:

drwxrwx--- 3 server server 4069 jan 20 17:25 test1  


Solution:1

Okay, problem solved:

Just a small thing, never use the GUI users and groups option, just use your terminal.

What I did (and works):

sudo -s  [your root password]  

Create a group and add users:

sudo groupadd [groupname] * creates a group  sudo usermod -a -G [groupname] [username] *add the user to the group  

Make a folder executable for a group and give rights:

sudo chgrp -R [groupname] [path/to/folder] * Gives usergroup also access  sudo chmod -R 770 [path/to/folder] * Gives rights to owner, usergroup and other  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »