php man page for posix_setgid

Query: posix_setgid

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

POSIX_SETGID(3) 							 1							   POSIX_SETGID(3)

posix_setgid - Set the GID of the current process

SYNOPSIS
bool posix_setgid (int $gid)
DESCRIPTION
Set 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(3) first, posix_setuid(3) last. Note If the caller is a super user, this will also set the effective group id.
PARAMETERS
o $gid - The group id.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 posix_setgid(3) example This example will print out the effective group id, once it is changed. <?php echo 'My real group id is '.posix_getgid(); //20 posix_setgid(40); echo 'My real group id is '.posix_getgid(); //40 echo 'My effective group id is '.posix_getegid(); //40 ?>
SEE ALSO
posix_getgrgid(3), posix_getgid(3). PHP Documentation Group POSIX_SETGID(3)
Related Man Pages
setregid(2) - opensolaris
setegid(2) - opendarwin
setregid(2) - netbsd
setregid(2) - sunos
posix_setgid(3) - php
Similar Topics in the Unix Linux Community
Set GID&#039;s
Re: User assigned to privileged group
Facebook Group for Complex Event Processing
Transfer output to empty file?
Gid=0 and 7 + admin=FALSE