posix_initgroups
(PHP 5 >= 5.2.0)
posix_initgroups — Calculate the group access list
Описание
bool posix_initgroups
( string $name
, int $base_group_id
)
Calculates the group access list for the user specified in name.
Список параметров
- name
-
The user to calculate the list for.
- base_group_id
-
Typically the group number from the password file.
Возвращаемые значения
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
Смотрите также
- The Unix manual page for initgroups(3).
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для управления процессами программ
- POSIX
- posix_access
- posix_ctermid
- posix_errno
- posix_get_last_error
- posix_getcwd
- posix_getegid
- posix_geteuid
- posix_getgid
- posix_getgrgid
- posix_getgrnam
- posix_getgroups
- posix_getlogin
- posix_getpgid
- posix_getpgrp
- posix_getpid
- posix_getppid
- posix_getpwnam
- posix_getpwuid
- posix_getrlimit
- posix_getsid
- posix_getuid
- posix_initgroups
- posix_isatty
- posix_kill
- posix_mkfifo
- posix_mknod
- posix_setegid
- posix_seteuid
- posix_setgid
- posix_setpgid
- posix_setrlimit
- posix_setsid
- posix_setuid
- posix_strerror
- posix_times
- posix_ttyname
- posix_uname
Коментарии
The function does not calculate groups, it sets groups access list of the current process in accordance to user information in /etc/groups.
Quote from Unix manual page for initgroups:
NAME
initgroups - initialize the supplementary group access list
...
DESCRIPTION
The initgroups() function initializes the group access list by reading the
group database /etc/group and using all groups of which user is a member.
The additional group group is also added to the list.