如何取消保护root所拥有的文件?
12.04 LTS和我错误地使用以下命令保护名为set
的文件:
chmod 700 /home/jatin/Desktop/set
我如何解除保护?
步骤#1 =在终端类型“gksu nautilus”中。
步骤#2 =导航到文件或文件夹的位置。
步骤#3 =右键单击文件或文件夹,选择“属性”,选择“权限”,然后选择所需的访问设置。 如果您不希望它由root拥有,您还可以更改谁拥有该文件或文件夹。
不要忘记之后关闭nautilus窗口 – 它以root权限运行。
答案是:
chmod a+rw filename
检查此表:
# 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
然后
chmod a+r file read is added for all chmod ax 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.
如果您可以作为根连接:
改变所有者:
sudo chown user:usergroup /path -R
将用户更改为您自己的用户
-R是递归的,所以内部的所有目录都将由用户拥有
更改权限:
sudo chmod 777 /path (An example to give permission drwxrwxrwx)
sudo chmod 755 /path
(给出权限drwxr-xr-x的一个例子)所以group和其他人可以阅读和执行。