> ls -al .total 32drwxrwxr-x 7 bob bob 4096 May 18 14:33 .drwxrwxr-x 4 bob bob 4096 May 12 15:44 ..drwxr-xr-x 2 bob bob 4096 June 1 14:22 log> cd ./log-bash: cd: log/: Permission denIEd> ls -al ./logls: cannot access log/..: Permission denIEdls: cannot access log/the.log: Permission denIEdls: cannot access log/.: Permission denIEdtotal 0d????????? ? ? ? ? ? .d????????? ? ? ? ? ? ..-????????? ? ? ? ? ? the.log> sudo ls -al ./logdrw-rw-r-- 3 bob bob 4096 Jun 2 04:11 .drwxrwxr-x 7 bob bob 4096 May 18 14:33 ..-rw-rw-r-- 1 bob bob 0 Jun 1 04:12 the.log
ls -al非常奇怪.它会列出我没有权限看的文件,但是没有显示权限?
所以问题是,这会导致什么?我该怎么做才能修复它?
解决方法> sudo ls -al ./log...drw-rw-r-- 3 bob bob 4096 Jun 2 04:11 .
它看起来不像Bob有./log的执行权限,所以他不能cd到它.
但
> ls -al ....drwxr-xr-x 2 bob bob 4096 June 1 14:22 log
表明他做到了.但它看起来并不像是指向同一个文件(不同的权限,不同的modtime).
尝试使用sudo ls -ail ./log和ls -ail来查看inode是否相同.
总结以上是内存溢出为你收集整理的linux – 对我拥有的文件’权限被拒绝’?全部内容,希望文章能够帮你解决linux – 对我拥有的文件’权限被拒绝’?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)