Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I would like the user to have full rights on this folder (as well as all sub-directories and files in it):


currently owned by root.

I have found numerous posts (in this forum and elsewhere) on how to do this for files but I can't find a way to do it for whole folders.

share|improve this question
Could anyone add a graphical method I wonder? – 8128 Oct 13 '10 at 19:23
@fluteflute is there a graphical method? – Marco Ceppi Oct 13 '10 at 19:33
gksu nautilus perhaps. I'm not quite sure and would like to know.... ;) – 8128 Oct 13 '10 at 19:39

5 Answers 5

up vote 237 down vote accepted

Use chown to change ownership and chmod to change rights.

As Paweł Karpiński said, use the -R option to apply the rights for all files inside of a directory too.

Note that both these commands just work for directories too. The -R option makes them also change the permissions for all files and directories inside of the directory.

For example

sudo chown -R username:group directory

will change ownership (both user and group) of all files and directories inside of directory and directory itself.

sudo chown username:group directory

will only change the permission of the folder directory but will leave the files and folders inside the directory alone.

As enzotib mentioned, you need to use sudo to change the ownership from root to yourself.


Note that if you use chown user: file (Note the left-out group), it will use the default group for that user.

share|improve this answer
It should be said that "sudo" is required for chown. – enzotib Oct 13 '10 at 9:45
fatanstic. You should consider maybe replacing 'user:user' by username. – user2413 Oct 13 '10 at 9:48
Although I have changed the owner and group to Me and my group, I cannot edit the file acpi-support. Why? Thx. – Casper LI Jan 26 '14 at 5:48
how do we get the name of a group? – GoProCameraByGoPro Mar 26 at 20:35
Change group without specifying user? – Donato Jul 31 at 20:16

If you prefer, this can be done with a GUI as well. You will need to open Nautilus as root to do so. Press Alt+F2 to access the "Run Applications" dialog and enter gksu nautilus

Next, browse to and right click on the folder you would like to modify. Then, select "Properties" from the context menu. You can now select the user or group that you would like to be the "Owner" of the folder as well as the permissions you would like to grant them. Finally, press "Apply Permissions to Enclosed Files" to apply the changes recursively.

Though it seems this does not always work for some operations in a deep folder tree. If it does not work use the appropriate terminal command.

alt text

share|improve this answer

Make the current user own everything inside the folder (and the folder itself).

chown $USER -R ~/.blabla
share|improve this answer
very helpful for newbies (like me) when don't know what to type in 'usergroup' for sudo chown <your username>:<your usergroup> -R <path to>/.blabla – quantme Jan 5 '12 at 1:49

If it's owned by root you can do this

sudo chown <your username>:<your usergroup> -R <path to>/.blabla

Since ./blabla owned by root you need to gain root privileges to change that. That's what sudo will do. The -R option for the chown command says: this directory and everything in it recursively.

share|improve this answer

you should try chmod -R

share|improve this answer

protected by Community Feb 21 '14 at 7:21

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.