• PHP Video Tutorials

PHP - Function lchgrp()

The lchgrp() function can change the group ownership of symlink. This function can return true on success or false on failure.


bool lchgrp ( string $filename , mixed $group )

This function can attempt to change the group of the symlink filename to the group. Only the superuser may change the group of a symlink arbitrarily, other users may change the group of a symlink to any group in which that user is a member.


   $target = "/PhpProject/PhpTest.php";
   $link  = "/PhpProject/test.html";
   symlink($target, $link);

   lchgrp($link, 8);