反而给予S的许可返还

当我跑步

sudo find . -type d -exec chmod g+s {} \+ 

我明白了

 drwsr-S--- 10 csantos www-data 4096 Ago 30 08:31 app/ -rw-r----- 1 csantos www-data 1646 Ago 30 08:31 artisan drwsr-S--- 3 csantos www-data 4096 Ago 30 08:31 bootstrap/ -rw-r----- 1 csantos www-data 1201 Jan 7 10:17 composer.json -rw-r----- 1 csantos www-data 111082 Jan 7 08:40 composer.lock 

为什么命令导致S权限而不是s

从这里: https : //unix.stackexchange.com/questions/27250/uppercase-s-in-permissions-of-a-folder

setgid在ls的输出中用小写“s”表示。 在没有效果的情况下,用大写字母“S”表示。

另请参阅: https : //superuser.com/questions/509114/what-does-directory-permission-s-mean-not-lower-case-but-in-upper-case

'S'=目录的setgid位被设置,但是执行位没有被设置。

's'=目录的setgid位被设置,并且执行位被设置。