public function setUserRights(\SplFileInfo $targetDir, $user = null, $group = null)
    {

        // Get our system configuration as it contains the user and group to set
        $systemConfiguration = $this->getInitialContext()->getSystemConfiguration();

        // check for the existence of a user
        if ($user == null) {
            $user = $systemConfiguration->getParam('user');
        }

        // check for the existence of a group
        if ($group == null) {
            $group = $systemConfiguration->getParam('group');
        }

        // change the owner for the passed directory
        FileSystem::recursiveChown($targetDir, $user, $group);
    }