[root@localhost ~]# mkdir 222
[root@localhost ~]# chmod g+s 222
[root@localhost ~]# cd 222
[root@localhost 222]# mkdir dir
[root@localhost 222]# touch file
[root@localhost 222]# ls -l
total 4
drwxr-sr-x. 2 root root 4096 Jul 20 19:23 dir
-rw-r--r--. 1 root root 0 Jul 20 19:23 file
file为什么不能继承S权限 ?
[root@localhost 222]# su - aming
[aming@localhost ~]$ cd /tmp/222
[aming@localhost 222]$ ls
dir dir2 file file2
[aming@localhost 222]$ ls -ld
drwxr-sr-x. 4 root root 4096 Jul 20 19:51 .
[aming@localhost 222]$ touch file3
touch: cannot touch `file3': Permission denied
为什么不能touch file?
[root@localhost ~]# chmod g+s 222
[root@localhost ~]# cd 222
[root@localhost 222]# mkdir dir
[root@localhost 222]# touch file
[root@localhost 222]# ls -l
total 4
drwxr-sr-x. 2 root root 4096 Jul 20 19:23 dir
-rw-r--r--. 1 root root 0 Jul 20 19:23 file
file为什么不能继承S权限 ?
[root@localhost 222]# su - aming
[aming@localhost ~]$ cd /tmp/222
[aming@localhost 222]$ ls
dir dir2 file file2
[aming@localhost 222]$ ls -ld
drwxr-sr-x. 4 root root 4096 Jul 20 19:51 .
[aming@localhost 222]$ touch file3
touch: cannot touch `file3': Permission denied
为什么不能touch file?
编辑回复