LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1211|回复: 1

还是不明白real user ID 和 effective user ID是什么区别?

[复制链接]
发表于 2007-12-21 17:20:28 | 显示全部楼层 |阅读模式
哪位大虾能详细地说明一下啊?
像getprocessid()等等函数都会提到real user ID, effective user ID.
自己总是一头雾水。
发表于 2007-12-22 20:53:49 | 显示全部楼层
Every process has six or more IDs associated with it:

real user ID
real group ID
effective user ID
effective group ID
supplementary group IDs
saved set-user-ID
saved set-group-ID.

The real user ID and real group ID identify who we really are. These two fields are taken from our entry in the password file when we log in. Normally, these values don't change during a login session.

The effective user ID, effective group ID, and supplementary group IDs determine our file access permissions, as we describe in the next section.

以上文字摘自APUE2一书4.4节. 具体请见该书.网上有电子版.
注:APUE2指<<Advanced Programming in the UNIX Environment>>Second Edition
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表