<HTML ><HEAD ><TITLE >posix_setgid</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK REL="HOME" TITLE="PHP Manual" HREF="manual.html"><LINK REL="UP" TITLE="POSIX functions" HREF="ref.posix.html"><LINK REL="PREVIOUS" TITLE="posix_setuid" HREF="function.posix-setuid.html"><LINK REL="NEXT" TITLE="posix_getgroups" HREF="function.posix-getgroups.html"></HEAD ><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.posix-setuid.html" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.posix-getgroups.html" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.posix-setgid" >posix_setgid</A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN23481" ></A >posix_setgid -- Set the effective GID of the current process </DIV ><DIV CLASS="refsect1" ><A NAME="AEN23484" ></A ><H2 >Description</H2 ><DIV CLASS="funcsynopsis" ><P ></P ><CODE CLASS="FUNCDEF" >bool posix_setgid</CODE >(int gid);<P ></P ></DIV ><P > Set the real group ID of the current process. This is a privileged function and you need appropriate privileges (usually root) on your system to be able to perform this function. The appropriate order of function calls is <B CLASS="function" >posix_setgid()</B > first, <A HREF="function.posix-setuid.html" ><B CLASS="function" >posix_setuid()</B ></A > last.</P ><P > Returns TRUE on success, FALSE otherwise.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.posix-setuid.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="manual.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.posix-getgroups.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >posix_setuid</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.posix.html" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >posix_getgroups</TD ></TR ></TABLE ></DIV ></BODY ></HTML >