Sometimes certain files have only root access or incase you get a file from the internet or from a friend which you are not able to access, then you may need to edit the permissions of the file.That way you can access the file easily from the next time.ROOT has access to all files and folders in your sysem.So to change the folder permission you need to have root privileges to change it to your username.So here's how you do it..

How to Edit Folder Permissions in Ubuntu
In this case i have a folder in /home/prash/Desktop called test and this folder has the following permissions

So if you look clearly at the screenshot , only root has access to this directory and OTHERS cant access the folder at all.You cant even change permissions here because its greyed out.This is what you would see if you try to access the test folder

Now the job is to change the permissions of the folder from root to prash ( which is my username it would be different for you, this would normally be your login username) . So here's how you do it.

Step 1 : Go to the terminal and type sudo nautilus
Step 2 : Now the nautilus window would pop up.. now browse to the directory which contains the root protected folder, in this case /home/prash/Desktop
Step 3 : Now right click on the folder which is root protected and click on properties and go to the Permissions tab.This is how it would look.

Now change the Owner to your username ( in this case - prash) and also the group to prash.You can do this by selecting your username from the drop down menu in the Owner field.Also set Folder Access to "Create and Delete Files".Also you may wish to set File Access to "Read and Write" so the files in that folder can also be accessible.Under OTHERS , you can do as you wish , i set it to Access Files Only.So after editing the permissions , here's how it would look.

NOTE:You may wish to use the same permission settings for all the files enclose by clicking on the "Apply Permissions to enclose files" button.
Step 4 : Close the permissions page and close the nautilus.
Step 5 : Now you should be able to access the folder since you have the permission to do so :-)

How to Edit File Permissions in Ubuntu
In this case i have a file in /home/prash/Desktop/test called test.txt and this file has the following permissions

So if you look clearly at the screenshot , only root has access to this file and OTHERS cant access the file at all.You cant even change permissions here because its greyed out.This is what you would see if you try to access the test.txt file

Now the job is to change the permissions of this file from root to prash ( which is my username it would be different for you, this would normally be your login username) . So here's how you do it.

Step 1 : Go to the terminal and type sudo nautilus
Step 2 : Now the nautilus window would pop up.. now browse to the directory which contains the root protected file, in this case /home/prash/Desktop/test
Step 3 : Now right click on the file which is root protected and click on properties and go to the Permissions tab.This is how it would look.

Now change the Owner to your username ( in this case - prash) and also the group to prash.You can do this by selecting your username from the drop down menu in the Owner field.Also set ACCESS to "Read and Write".Under OTHERS , you can do as you wish , i set it to Read Only.So after editing the permissions , here's how it would look.

Step 4 : Close the permissions page and close the nautilus.
Step 5 : Now you should be able to access the file since you have the permission to do so :-)

0 comments

Post a Comment