Page tree
Skip to end of metadata
Go to start of metadata

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:

  • Navigate into the directory /modules/servers/freenas/
  • Open the file customconfig.php, or rename customconfig.example.php to customconfig.php, if it does not exist

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".

  • No labels