- 论坛徽章:
- 0
|
- Google ~/t # umask
- 0022
- Google ~/t # touch file
- Google ~/t # ll file
- -rw-r--r-- 1 root root 1406 Sep 11 17:59 file #-----当前为644
- Google ~/t # chmod 2644 file #-----在原来的基础上加上setgid位
- Google ~/t # ll file
- -rw-r-Sr-- 1 root root 1406 Sep 11 17:59 file #----因为是26[color=Red]4[/color]4,组的执行权位为空,
- #+这个时候出现的是大S
- Google ~/t # chmod 4644 file
- Google ~/t # ll file #---道理跟上面一样
- -rwSr--r-- 1 root root 1406 Sep 11 17:59 file
- Google ~/t # chmod 2744 file #
- Google ~/t # ll file
- -rwxr-Sr-- 1 root root 1406 Sep 11 17:59 file
- Google ~/t # chmod 2754 file # 设置把组权限设置为5r-x,并设置setgid位
- Google ~/t # ll file
- -rwxr-sr-- 1 root root 1406 Sep 11 17:59 file
- Google ~/t # chmod 6744 file # 设置setuid
- Google ~/t # ll file
- -rwsr-Sr-- 1 root root 1406 Sep 11 17:59 file
复制代码
[ 本帖最后由 lucash 于 2009-9-12 11:17 编辑 ] |
|