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";
        }
    }