为什么Linux中根目录权限为 555 还可以往/中创建文件
[root@Home-PC/]#ll-d/dr-xr-xr-x.24rootroot4096Aug909:25/[root@Home-PC/]#lltotal98dr-x...
[root@Home-PC /]# ll -d /
dr-xr-xr-x. 24 root root 4096 Aug 9 09:25 /
[root@Home-PC /]# ll
total 98
dr-xr-xr-x. 2 root root 4096 Aug 9 07:39 bin
dr-xr-xr-x. 5 root root 1024 Aug 8 09:14 boot
drwxr-xr-x. 2 root root 4096 Aug 2 22:50 cgroup
drwxr-xr-x. 20 root root 4060 Aug 9 07:07 dev
drwxr-xr-x. 134 root root 12288 Aug 9 07:39 etc
drwxr-xr-x. 4 root root 4096 Aug 7 17:35 home
dr-xr-xr-x. 17 root root 12288 Aug 9 07:38 lib
drwx------. 2 root root 16384 Aug 7 17:03 lost+found
drwxr-xr-x. 2 root root 4096 Aug 9 06:45 media
drwxr-xr-x. 2 root root 4096 Oct 1 2009 mnt
drwxr-xr-x. 2 root root 4096 Oct 1 2009 opt
dr-xr-xr-x. 200 root root 0 Aug 9 2010 proc
dr-xr-x---. 9 root root 4096 Aug 9 08:54 root
dr-xr-xr-x. 2 root root 12288 Aug 9 07:39 sbin
drwxr-xr-x. 7 root root 0 Aug 9 2010 selinux
drwxr-xr-x. 2 root root 4096 Oct 1 2009 srv
drwxr-xr-x. 13 root root 0 Aug 9 2010 sys
drwxrwxrwt. 17 root root 4096 Aug 9 08:52 tmp
drwxr-xr-x. 13 root root 4096 Oct 30 2008 usr
drwxr-xr-x. 24 root root 4096 Aug 8 08:25 var
[root@Home-PC /]# > test
[root@Home-PC /]# ll
total 98
dr-xr-xr-x. 2 root root 4096 Aug 9 07:39 bin
dr-xr-xr-x. 5 root root 1024 Aug 8 09:14 boot
drwxr-xr-x. 2 root root 4096 Aug 2 22:50 cgroup
drwxr-xr-x. 20 root root 4060 Aug 9 07:07 dev
drwxr-xr-x. 134 root root 12288 Aug 9 07:39 etc
drwxr-xr-x. 4 root root 4096 Aug 7 17:35 home
dr-xr-xr-x. 17 root root 12288 Aug 9 07:38 lib
drwx------. 2 root root 16384 Aug 7 17:03 lost+found
drwxr-xr-x. 2 root root 4096 Aug 9 06:45 media
drwxr-xr-x. 2 root root 4096 Oct 1 2009 mnt
drwxr-xr-x. 2 root root 4096 Oct 1 2009 opt
dr-xr-xr-x. 200 root root 0 Aug 9 2010 proc
dr-xr-x---. 9 root root 4096 Aug 9 08:54 root
dr-xr-xr-x. 2 root root 12288 Aug 9 07:39 sbin
drwxr-xr-x. 7 root root 0 Aug 9 2010 selinux
drwxr-xr-x. 2 root root 4096 Oct 1 2009 srv
drwxr-xr-x. 13 root root 0 Aug 9 2010 sys
-rw-r--r--. 1 root root 0 Aug 9 09:30 test
drwxrwxrwt. 17 root root 4096 Aug 9 08:52 tmp
drwxr-xr-x. 13 root root 4096 Oct 30 2008 usr
drwxr-xr-x. 24 root root 4096 Aug 8 08:25 var
明明权限为555为什么还可以创建文件 展开
dr-xr-xr-x. 24 root root 4096 Aug 9 09:25 /
[root@Home-PC /]# ll
total 98
dr-xr-xr-x. 2 root root 4096 Aug 9 07:39 bin
dr-xr-xr-x. 5 root root 1024 Aug 8 09:14 boot
drwxr-xr-x. 2 root root 4096 Aug 2 22:50 cgroup
drwxr-xr-x. 20 root root 4060 Aug 9 07:07 dev
drwxr-xr-x. 134 root root 12288 Aug 9 07:39 etc
drwxr-xr-x. 4 root root 4096 Aug 7 17:35 home
dr-xr-xr-x. 17 root root 12288 Aug 9 07:38 lib
drwx------. 2 root root 16384 Aug 7 17:03 lost+found
drwxr-xr-x. 2 root root 4096 Aug 9 06:45 media
drwxr-xr-x. 2 root root 4096 Oct 1 2009 mnt
drwxr-xr-x. 2 root root 4096 Oct 1 2009 opt
dr-xr-xr-x. 200 root root 0 Aug 9 2010 proc
dr-xr-x---. 9 root root 4096 Aug 9 08:54 root
dr-xr-xr-x. 2 root root 12288 Aug 9 07:39 sbin
drwxr-xr-x. 7 root root 0 Aug 9 2010 selinux
drwxr-xr-x. 2 root root 4096 Oct 1 2009 srv
drwxr-xr-x. 13 root root 0 Aug 9 2010 sys
drwxrwxrwt. 17 root root 4096 Aug 9 08:52 tmp
drwxr-xr-x. 13 root root 4096 Oct 30 2008 usr
drwxr-xr-x. 24 root root 4096 Aug 8 08:25 var
[root@Home-PC /]# > test
[root@Home-PC /]# ll
total 98
dr-xr-xr-x. 2 root root 4096 Aug 9 07:39 bin
dr-xr-xr-x. 5 root root 1024 Aug 8 09:14 boot
drwxr-xr-x. 2 root root 4096 Aug 2 22:50 cgroup
drwxr-xr-x. 20 root root 4060 Aug 9 07:07 dev
drwxr-xr-x. 134 root root 12288 Aug 9 07:39 etc
drwxr-xr-x. 4 root root 4096 Aug 7 17:35 home
dr-xr-xr-x. 17 root root 12288 Aug 9 07:38 lib
drwx------. 2 root root 16384 Aug 7 17:03 lost+found
drwxr-xr-x. 2 root root 4096 Aug 9 06:45 media
drwxr-xr-x. 2 root root 4096 Oct 1 2009 mnt
drwxr-xr-x. 2 root root 4096 Oct 1 2009 opt
dr-xr-xr-x. 200 root root 0 Aug 9 2010 proc
dr-xr-x---. 9 root root 4096 Aug 9 08:54 root
dr-xr-xr-x. 2 root root 12288 Aug 9 07:39 sbin
drwxr-xr-x. 7 root root 0 Aug 9 2010 selinux
drwxr-xr-x. 2 root root 4096 Oct 1 2009 srv
drwxr-xr-x. 13 root root 0 Aug 9 2010 sys
-rw-r--r--. 1 root root 0 Aug 9 09:30 test
drwxrwxrwt. 17 root root 4096 Aug 9 08:52 tmp
drwxr-xr-x. 13 root root 4096 Oct 30 2008 usr
drwxr-xr-x. 24 root root 4096 Aug 8 08:25 var
明明权限为555为什么还可以创建文件 展开
3个回答
展开全部
root 用户对属于自己的文件,不管你设置权限是什么,都有写的权限。就算设成000,也是有权限写的,这是root用户的特殊之处。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的宿主是root,自己的目录当然有权限啦!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询