0

Before I would write "sudo chmod 777" and then the name of the file or folder but now it doesn't seem to change any permissions. I looked at multiple tutorials on how to use chmod and can't figure anything out. I need to change permissions of a folder with a lot of files. How can I change the permissions of all the files in one go? I need to change the permissions from root to my user account. Running nautilus in gksudo only allows me to change the permissions 1 file by one which will take way to long to do. When I select multiple files at once and go to the permissions tab in the properties it just says that the owner is root and I cannot change it.

Nick Bailuc
  • 3,308
  • 12
  • 45
  • 67
  • On mine atleast, you can change permission in Nautilus recursively with ['Change Permissions for Enclosed Files' ot 'Apply Permissions to Enclosed Files'](http://i.stack.imgur.com/Qn9jY.png) button. This also may be a duplicate of http://askubuntu.com/questions/114823/how-can-i-change-permissions-of-a-folder-including-its-enclosed-files-and-subdi – Wilf Dec 20 '13 at 16:55

3 Answers3

2

To recursively change a folder, all the files within any subfolders, all the files within and so on:

sudo chmod 755 -R <folder>
Rudu
  • 233
  • 1
  • 5
  • 12
1

Try with:

sudo chown -R [FROM USERNAME]:[TO USERNAME] [FOLDER] 
  • You should not be changing ownership and permissions outside of your home directory, doing so can break ubuntu. chmod 777 is generally bad advice. – Panther Dec 20 '13 at 17:18
  • @bodhi.zazen Thanks for the information. I edited. But I mentioned it as 0755. –  Dec 20 '13 at 17:25
  • Thank you, just be aware that chmod -R on many system directories breaks ubuntu. – Panther Dec 20 '13 at 17:57
1

Haven't you forgot a little -R? If with "folder" you mean a directory and its files, so chmod must be utilized recursively:

sudo chmod -R 777 [Directory]
Eric Carvalho
  • 53,609
  • 102
  • 137
  • 162
Silvia
  • 538
  • 2
  • 9
  • Please use code tags: ``, and you might want to link to manual page, like [this](http://ss64.com/bash/chmod.html) one. – Wilf Dec 20 '13 at 16:50