Color Scheme
搜索用户
帐号
密码
注册
old site http://222.195.74.11/
English Version 当前位置: 首页 >> 傅向荣 : 个人简历 - 发表论文 - 博客

Debian和Linux

Poster:

1. usage of setuid, setgid and sticky bit
对可执行文件,setuid, setgid bit的含意比较简单,即以文件所有者或所在组的权限来执行一个文件。
对目录,setgid bit可使其下新创建文件的group owner与文件夹一致,但不继承组权限。
sticky bit的功能是保护一个文件或文件夹不被删除或移动,但如果同组用户有写的权限,仍然可以修改其内容。形象的说就是把文件或文件夹“粘”在一个地方,可以随意修改,但是不能移动它(当然owner还是有这个权限的)。这对于某些目录来说有重要意义,例如ftp服务器有incoming目录,为了让用户可以上传,需要把group的权限设为rwx。这样一来,任何可以写这个目录的用户虽然可能无法删除这个目录(因为里面有其他用户的文件),但可以把这个目录移动到别的地方,使其他用户无法使用。设置sticky bit就可以防止这种状况。
ls -l中特殊符号的含意 T=sticky bit,t=T+x,S= setuid or setgid bit, s=S+x
傅向荣
Posted at 2006-12-26 14:50 CST
Last modified at 2006-12-26 14:53 CST
Link to this poster
Top


位置 | 访问统计 | FAQ
Best view under the 1024x768 resolution and with the normal size of fonts.
Designed & developed by Yuming Wang, run for 6364 days since December 15, 2006, and last upgraded on May 28th, 2009.
Powered by Apache + PHP coded cOpfOs 3.11.1 last upgraded on February 22nd, 2010.
Copyright © 2006, all rights reserved.