分页: 1 / 1

大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 11:24
Messiya
为了避免是权限问题;
我先
chmod 777 file
了一下,之后
ls -l file
查看属性
-rwxrwxrwx

但是cat,或者vi,或者cp的时候
还是报错误operation not permitted
只有mv可以执行

现在文件在linux下,用ssh传到windows下也操作失败
哪位大侠救我

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 12:02
tusooa
ls -ld
看目录的属性,如果你没有目录的写权限,则不可以添加/删除里面的文件。
sudo看看

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 12:59
monk
命令前面加 sudo

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 13:01
delectate
不会是改的/,然后递归吗?

如果没有就sudo之……理论上不应该

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 13:04
eexpress
目录权限是什么。多看

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 13:11
tenzu
会不会是只改了/,以下的都没改?

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 15:44
aerofox
如果你的目录没有 x 权限,有 r 权限,则可以看到文件,但是不能用 cat、vi 等对文件内容进行操作的命令。

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 15:57
Messiya
tenzu 写了:会不会是只改了/,以下的都没改?
什么叫只改了/ ?

本来这个文件root就是有读写权限的。
太诡异了

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-13 16:07
Messiya
aerofox 写了:如果你的目录没有 x 权限,有 r 权限,则可以看到文件,但是不能用 cat、vi 等对文件内容进行操作的命令。
目录是我自己生成的
肯定我有权限啊
我试着 chmod +x 文件夹 ;chmod +x 文件

结果还是一样的

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-15 15:47
tusooa
chmod +w才是正道!

Re: 大侠救我!cat,vi 都提示 operation not permitted

发表于 : 2010-07-15 16:14
Messiya
问题已经解决
原来是我的杀毒软件在保护文件
我那个文件好像是带毒的