How do I unprotect a file which is owned by root?

12,083

Solution 1

Step #1 = In terminal type "gksu nautilus".

Step #2 = Navigate to where the file or folder is.

Step #3 = Right click the file or folder, choose "properties", choose "permissions", and then choose the desired access settings. You can also change who owns the file or folder if you don't want it to be owned by root.

Don't forget to close the nautilus window afterwards - it runs with root permissions.

screenshot:

Solution 2

the answer is:

chmod a+rw filename

check this table:

#   Permission      rwx
7   full                111
6   read and write      110
5   read and execute    101
4   read only       100
3   write and execute   011
2   write only      010
1   execute only        001
0   none                000

and then

chmod a+r file  read is added for all
chmod a-x file  execute permission is removed for all
chmod a+rw file change the permissions of the file file to read and write for all.
chmod +rwx file On some UNIX platforms such as BSD, this will restore the permission of the file file to default: -rwxr-xr-x.
chmod u=rw,go= file read and write is set for the owner, all permissions are cleared for the group and others
chmod -R u+w,go-w docs  change the permissions of the directory docs and all its contents to add write access for the user, and deny write access for everybody else.
chmod = file    removes all privileges for all.
Share:
12,083

Related videos on Youtube

Jatttt
Author by

Jatttt

Updated on September 18, 2022

Comments

  • Jatttt
    Jatttt over 1 year

    12.04 LTS and I mistakenly protected a file named set using:

    chmod 700 /home/jatin/Desktop/set
    

    How do I unprotect it?

    • NKN
      NKN about 10 years
      chmod 755 does that.
  • web.learner
    web.learner about 10 years
    I don't think you want to 777 it.