谁可以访问具有八进制权限"000"的文件?在Linux/UNIX上? [英] Who can access a file with octal permissions "000" on Linux/UNIX?

查看:154
本文介绍了谁可以访问具有八进制权限"000"的文件?在Linux/UNIX上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果文件具有权限000,谁或什么人可以访问该文件?他们能做什么呢?

If a file has permissions 000, who or what can access the file? What can they do to it?

实际上,对文件的000 (---------)权限实际上意味着什么?

What, exactly, does 000 (---------) permissions on a file mean in practice?

推荐答案

root可以执行所有操作,而其他用户(使用userid!= 0)则无法执行任何操作.但是任何对包含文件夹具有写访问权的人都可以删除该文件. 所有者当然可以随时更改标志并重新获得访问权限.

root can do everything, others (with userid != 0) can't do anything. But anyone who has write access to the containing folder is allowed to delete the file. The owner can of course always change the flags and regain access anytime.

greybox:~ septi$ touch foo
greybox:~ septi$ chmod 000 foo
greybox:~ septi$ ls -l foo
----------  1 septi  staff  0 Apr  8 12:28 foo
greybox:~ septi$ cat foo
cat: foo: Permission denied
greybox:~ septi$ sudo ls -l foo
Password:
----------  1 septi  staff  0 Apr  8 12:28 foo
greybox:~ septi$ 

这篇关于谁可以访问具有八进制权限"000"的文件?在Linux/UNIX上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆