PHP chgrp() Function

❮ PHP Filesystem Reference

Example

Change the usergroup to "admin" for the "test.txt" file:

<?php
chgrp("test.txt","admin")
?>


Definition and Usage

The chgrp() function changes the usergroup of the specified file.

Syntax

chgrp(file, group)

Parameter Values

Parameter Description
file Required. Specifies the path to the file to change user group for
group Required. Specifies the new group name or number


Technical Details

Return Value: TRUE on success, FALSE on failure
PHP Version: 4.0+

❮ PHP Filesystem Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.