linux – 对我拥有的文件’权限被拒绝’?

linux – 对我拥有的文件’权限被拒绝’?,第1张

概述我的用户bob无法访问他(理论上拥有)的文件.我正在运行Fedora Core 8.它可能比告诉我更容易显示: > 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 lo 我的用户bob无法访问他(理论上拥有)的文件.我正在运行Fedora Core 8.它可能比告诉我更容易显示:
> 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 – 对我拥有的文件’权限被拒绝’?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1045395.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存