posix_setgid() - posix函数(可移植操作系统接口)
posix_setgid()
(PHP 4, PHP 5, PHP 7)
Set the GID of the current process
说明
posix_setgid(int $gid): boolSet the real group ID of the current process. This is a privileged function and needs appropriate privileges(usually root)on the system to be able to perform this function. The appropriate order of function calls is posix_setgid() first,posix_setuid() last.
Note:If the caller is a super user, this will also set the effective group id.
参数
$gidThe group id.
返回值
成功时返回TRUE
,或者在失败时返回FALSE
。
范例
posix_setgid() example
This example will print out the effective group id, once it is changed.
参见
posix_getgrgid()
Return info about a group by group idposix_getgid()
Return the real group ID of the current process
if you're going to use this along with posix_setuid, make sure you call posix_setgid first: following works: following will not set gid
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!