+ -
当前位置:首页 → 问答吧 → 请教在BSD中FIND查询权限的命

请教在BSD中FIND查询权限的命

时间:2004-03-29

来源:互联网

find . -type f -perm 4755 -print
这条命令本来可以用来查找SUID的啊,为什么我输进去我没有反应呢,我去掉4后它就有反应了


请兄弟帮忙看看

另外查SUID有没有别的方式了

作者: 黑洞   发布时间: 2004-03-29

觉的这个命令最好用了。。

代码:
 -perm [-|+]mode
 The mode may be either symbolic (see chmod(1)) or an octal num-
 ber. If the mode is symbolic, a starting value of zero is
 assumed and the mode sets or clears permissions without regard to
 the process' file mode creation mask. If the mode is octal, only
 bits 07777 (S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG |
 S_IRWXO) of the file's mode bits participate in the comparison.
 If the mode is preceded by a dash (``-''), this primary evaluates
 to true if at least all of the bits in the mode are set in the
 file's mode bits.      If the mode is preceded by a plus (``+''),
 this primary evaluates to true if any of the bits in the mode are
 set in the file's mode bits. Otherwise, this primary evaluates
 to true if the bits in the mode exactly match the file's mode
 bits. Note, the first character of a symbolic mode may not be a
 dash (``-'').
不过偶也看不懂。

作者: 777   发布时间: 2004-03-29

不知道为什么,哪位朋友指导一下啊

作者: 黑洞   发布时间: 2004-03-29

find . -perm 4755 -print

作者: Eg_zm   发布时间: 2004-03-29

这个好像不行吧,我试过了呢

作者: 黑洞   发布时间: 2004-03-29

[zhaom@mail bin]$ find . -perm 4755 -print
./ping
./mount
./umount
./su
[zhaom@mail bin]$

作者: Eg_zm   发布时间: 2004-03-29

我在4.9下面执行:find / -perm 4755 -print
总共只找到了一个文件,呵呵,你的没有反映只能说明你的系统里面拥有4755权限位的文件是零个。高兴吧!

作者: Eg_zm   发布时间: 2004-03-30

不是啊不是啊
我在打开一个目录后,看到有4755权限的文件以后,在按照他的权限输入查找的呢

作者: 黑洞   发布时间: 2004-03-30

你可以在你的文件夹里面手动建立一个4755权限位的文件 ,然后查找再看看效果。

作者: Eg_zm   发布时间: 2004-03-30

谢谢你啊

作者: 黑洞   发布时间: 2004-03-31