Can't set env variable

  • Hi,

    I'm encountering some issues while trying to disable the option --manage-gid.


    I need to mount an NFS share on a system where the primary gid of the user is not the gid of the owner of the folder. With "--manage-gids" enabled there is no way of having the system consider secondary gids. I've read online that I need to remove such option in order to have NFS check permissions using also secondary gids.


    This solution solves indeed my problem: by manually updating the file /etc/default/nfs-kernel-server setting RPCMOUNTDOPTS to "", after a service restart, the NFS server works as intended.

    As expected, this config change is just temporary and does not survive because omv overwrites the file. To make the change permantent, I tried to:

    • set the env variable OMV_NFSD_MOUNTDOPTS to "", using omv-env set;
    • ensure the env is properly updated in the file /etc/default/openmediavault;
    • apply the changes, using monit restart omv-engined && omv-salt stage run prepare && omv-salt stage run deploy.


    After a restart the changes I've done to the variable stuck (echo $OMV_NFSD_MOUNTDOPTS and the file /etc/default/openmediavault confirm this) but omv is still setting RPCMOUNTDOPTS="--manage-gids" in /etc/default/nfs-kernel-server, which is the file actually read by the nfs daemon.


    Am I doing something wrong or is this an issue?

    Is there a way to remove permanently manage-gids from the nfs config?


    Thank in advance to anybody who will spend some time trying to understand this!

  • Dudoleitor

    Hat das Label von OMV 5.x auf OMV 6.x geändert.
  • If this

    omv-salt stage run prepare && omv-salt stage run deploy

    writes the correct file, any apply on the UI should do the same.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thanks for your suggestion!


    Eventually I found out that the settings where not applied because the env variable had an empty value. By setting OMV_NFSD_MOUNTDOPTS to --no-nfs-version 3 and reapplying the settings now the file /etc/default/nfs-kernel-server is properly updated.


    I don't know if this is the expected behaviour (env with an empty value is considered as if it's not-set, so the default setting is used) or if this is a bug though.

  • I don't know if this is the expected behaviour (env with an empty value is considered as if it's not-set, so the default setting is used) or if this is a bug though.

    This is expected, but I think you can use spaces to overcome this.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Ok, ok understood.


    Anyway, I think it would be better if the docs explained this behaviour, because it took me a couple of days to figure it out.


    Issue resolved, thanks again!

  • Dudoleitor

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!