chgrp

bool chgrp(string file, mixed group) 
file File to change
group Group name or gid

Changes the group of a file.

Returns:

TRUE on success; FALSE on error

Description:

chgrp() is a wrapper for the UNIX system utility chgrp. It allows group ownership to be changed on local files. The file argument should be an absolute path or a relative path, while the group argument can be a group name or numeric group ID.

The owner of the file to be included must be the PHP UID or the directory in which the file resides must be owned by the PHP UID.

If safe mode is enabled, chgrp() can only change the group ownership of files that are owned by the user running the command. In most cases, this is the user that the web server runs as.

The superuser can ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.