Sometimes it may be necessary to change the mapall or maproot configuration for a user. This setting can be programmatically changed using a function in the file customconfig.php.
This function is called when the NFS service is activated. Say when creating the backup space or when activating by the customer or a WHMCS admin.

To enable the feature, proceed as follows:

The function is uncommented by default. Therefore, no additional steps are required if you want to enable this feature for all users.

function freenas_setNfsOwner ($params) {
    return array ('user' => $params['username'], 'group' => 'wheel', 'mode' => 'maproot');
}

Accepted modes are "maproot" or "mapall".