"查找\( -perm -04000 -o -perm -02000 \)"是什么意思



我知道这个:

find . -perm -664
Search  for  files which have read and write permission for their owner and group, 
and which other users can read.

但我不知道0400002000的含义是什么,也许lsattr可以告诉我?但我对此也一无所知。

THX。

我得出的结论是,下面的两个命令都给出了相同的输出:

SUID权限搜索命令:

  • find / -perm -u=s -type f -ls 2>/dev/null
  • find / -perm -04000 -type f -ls 2>/dev/null

以及:

SGID权限搜索命令:

  • find / -perm -g=s -type f -ls 2>/dev/null
  • find / -perm -02000 -type f -ls 2>/dev/null

因此find ( -perm -04000 -o -perm -02000 )正在搜索SUID和SGID的许可位。此处的文档:https://www.gnu.org/software/libc/manual/html_node/Permission-Bits.html

最新更新