在使用chmod删除* all *读/写/执行权限之后,是否有可能获得写入/读取权限?

我不小心删除了文件中的所有权限。 现在我没有chmod权限。 是否有任何方法chmod(ing)文件回来?

谢谢

我怀疑还有更多的事情比你的问题状态,因为这不应该发生:

[madhatta@risby tmp]$ touch foo [madhatta@risby tmp]$ chmod 000 foo [madhatta@risby tmp]$ ls -la foo ----------. 1 madhatta madhatta 0 Dec 28 22:25 foo [madhatta@risby tmp]$ chmod 644 foo [madhatta@risby tmp]$ ls -la foo -rw-r--r--. 1 madhatta madhatta 0 Dec 28 22:25 foo 

正如你所看到的,无法访问文件是不能改变模式的。 你能告诉我们更多关于你做了什么,看到了什么,出了什么问题?

在情况下,如果你不是这个文件的所有者,你不能改变这个文件的mod。

 mnk@mnk:$ ls -la asd ---------- 1 root root 0 2010-12-29 11:17 asd mnk@mnk:$ chmod 777 asd chmod: changing permissions of `asd': Operation not permitted 

在这种情况下,尝试从root用户使用chown命令:

 mnk@mnk:$ sudo chown mnk:mnk asd mnk@mnk:$ chmod 777 asd mnk@mnk:$ ls -la asd -rwxrwxrwx 1 mnk mnk 0 2010-12-29 11:17 asd