setgid(2) System Calls Manual setgid(2) setgid - C (libc, -lc) #include int setgid(gid_t gid); setgid() . (, CAP_SETGID ), . Linux setgid() , POSIX _POSIX_SAVED_IDS. set-group-ID- ( ) , . 0. -1, errno . EINVAL , gid, . EPERM ( CAP_SETGID ) gid set-group-ID . C ID . POSIX , . NPTL POSIX , UID GID . ( setgid()) , , , . nptl(7). POSIX.1-2008. POSIX.1-2001, SVr4. setgid() Linux 16- . Linux 2.4 setgid32(), 32- . glibc gsetgid() . getgid(2), setegid(2), setregid(2), capabilities(7), credentials(7), user_namespaces(7) () Alexander Golubev , Azamat Hackimov , Hotellook, Nikita , Spiros Georgaras , Vladislav , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . setgid(2)