protected function changeGroup($path, $newGroup)
    {
        $groupGid = filegroup($path);
        $groupData = posix_getgrgid($groupGid);
        $oldGroup = $groupData['name'];
        if ($oldGroup !== $newGroup) {
            if(!@chgrp($path, $newGroup)) {
                throw new CException(sprintf('Unable to change group for %s, permission denied', $path));    
            }
            echo sprintf("Changing group for %s (%s => %s)... ", $path, $oldGroup, $newGroup);
            echo "done\n";
        }
    }
protected function changeGroup($path, $newGroup)
    {
        $groupGid = filegroup($path);
        $groupData = posix_getgrgid($groupGid);
        $oldGroup = $groupData['name'];
        if ($oldGroup !== $newGroup) {
            if(!@chgrp($path, $newGroup)) {
                throw new CException(sprintf('Unable to change group for %s, permission denied', $path));    
            }
            echo sprintf("Changing group for %s (%s => %s)... ", $path, $oldGroup, $newGroup);
            echo "done\n";
        }
    }
protected function changeGroup ( $ path , $ newGroup ) { $ groupGid = filegroup ( $ path ) ; $ groupData = posix_getgrgid ( $ groupGid ) ; $ oldGroup = $ groupData [ 'name' ] ; if ( $ oldGroup !== $ newGroup ) { if ( ! @ chgrp ( $ path , $ newGroup ) ) { throw new CException ( sprintf ( 'Unable to change group for %s, permission denied' , $ path ) ) ; } echo sprintf ( "Changing group for %s (%s => %s)... " , $ path , $ oldGroup , $ newGroup ) ; echo "done\n" ; } }
Changes the group for a directory.
@param string $path the directory path.
@param string $newGroup the name of the new group.
Changes the group for a directory .