Note: This function doesn't work on remote files as the file to be examined must be accessible via the server's filesystem.
lchgrp(file, group)
Parameter | Description |
---|---|
file | Required. Specifies the path to the symlink |
group | Required. Specifies the new group by name or number |
Lets assume that we have a file called demo.txt in the current working directory. In the example below a symbolic link is created. Then, lchgrp() function is used to change its group ownership.
Output :
Symbolic link has been created.
Group ownership is successfully changed