Home > PHP > Function > POSIX > posix_setgid()

posix_setgid()

posix_setgid - Set the GID of the current process

Syntax

bool posix_setgid (int $gid)

Arguments

  • gid - The group id.

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() first, posix_setuid() last.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure.