POSIX_SETEGID(3) 1 POSIX_SETEGID(3)
posix_setegid - Set the effective GID of the current process
SYNOPSIS
bool posix_setegid (int $gid)
DESCRIPTION
Set the effective 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.
PARAMETERS
o $gid
- The group id.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
posix_setegid(3) example
This example will print out the effective group id, once changed.
<?php
echo 'My real group id is '.posix_getgid(); //20
posix_setegid(40);
echo 'My real group id is '.posix_getgid(); //20
echo 'My effective group id is '.posix_getegid(); //40
?>
SEE ALSO
posix_getgrgid(3), posix_getgid(3), posix_setgid(3).
PHP Documentation Group POSIX_SETEGID(3)