View Full Version : [ubuntu] Give permissions

May 15th, 2010, 10:10 AM

I had to reinstall ubuntu recently. After backup one of my folders remains without permissions, so I have to open nautilus as a sudo and give it permissions for me to open it, but it doesn't applies for all the subfolders.
Is there any command to do this for the folder and all its content or should I do it one by one?

Thank you

May 15th, 2010, 10:18 AM
You can do that in terminal:

chown -R username:group /path/to/folderReplace username and group with the username and groupname you want to give rights to. The -R option is for recursive.
After that:

chmod -R zzz /path/to/folderReplace zzz with the numbers of the rights you want to assign. Read = 4, Write = 2 and Execute = 1. So: if the owner can read+write+execute, the group can only read and "the rest of the world" has no access it will be:

chmod -R 740 /path/to/folderReplace /path/to/folder with the path to the actual folder.

Edit: you might have to use sudo before those commands, if the localuser has no rights to the specified folder and it's subfolders

May 15th, 2010, 12:08 PM
Perfect, thank you again.