Change permissions on all folders and files

I have ubuntu 12.04. I want to change permissions on all folders and files at the same time so that anyone can modify or remove them.


Solution 1:

If you are talking about your home folder or any shared folder then you can chmod -R 777 /Your/folder/path/. If you just want to make the files read and write enabled then I would set the permissions to 766 instead.

This said, for this to work, your partition entry in the fstab file must permit read/write and execute permissions.

Solution 2:

First important point you do not want to change the permissions on all files and folders: changing the permissions on some files can break your system.

Command Line Way

So lets assume instead you want to change the the permissions in all the files in a particular folder and its sub-folders.

I have a folder in my home directory which does not give any access to "others"; this contains a sub-folder sub which also does not give any access to others.

img no access

If I now want to give "others" read access I make sure I am in the correct directory and enter

chmod -R o+r *

As you can see the permissions are changed

img with access

If you only want to do this in the current directory omit -R from the command.

If you want to do this in a directory you don't own you will need to prefix the command with sudo

GUI way

If the files are owned by you run the file manager if not press ALT+F2

Type gksu nautilus and enter your password when requested.

Hold down the SHIFT key or CTRL key to select the files you want: SHIFT selects all the files in a range CTRL selects one file at a time. Now right click and select properties; in the window that opens you can select the permissions tab and you can set the permissions from there.