How to set options for a nfs share?

jba
jba Posts: 2  Freshman Member
edited December 2017 in Personal Cloud Storage
I have a nsa310 which runs the nfs package with some shares. However, I am unable to set options (like insecure) to the shares. Is there any way to do this from the gui?

It is possible to change /etc/exports from command line and add the needed options. However, when I change anything from the gui, the added options will be overridden.

jba

#NAS_November

Comments

  • Ijnrsi
    Ijnrsi Posts: 254  Master Member
    Hi @jba
    I tried before, modify the configuration files under /etc, after reboot the configuration will be reset automatically, so I think there are the default configuration files saved and would be loaded during booting.
    But for option, do you mean set privillage on the NFS folder to limit user's access?
  • jba
    jba Posts: 2  Freshman Member
    In my case I can modify /etc/exports and the changes are not touched after rebbot.

    No, I dont want to limit user access. The problem is that I run Kodi which should access a nfs share. As Kodi has an builtin nfs client and runs not as root on my android device, it cannot use ports smaller than 1024. However, by default the nfs server will publish on a privileged port < 1024. The option insecure tells the nfs server to run on a port >1024 so that a userspace client can access.

    However, there may be other option I might like to change in my shares. Would be nice to have a more simple and direct way to do so.

    Juergen
  • Ijnrsi
    Ijnrsi Posts: 254  Master Member
    OK, maybe some of /etc files would be changed after reboot.
    But I think there is no way to change port for NFS, because no GUI option and CLI, besides I know Kodi supports samba protocol, maybe you can use samba protocol on your Kodi to play media files.

  • Mijzelf
    Mijzelf Posts: 2,213
    100 Answers 1000 Comments Friend Collector Fifth Anniversary
     Guru Member
    The /etc directory is in the initrd, which is a ramdrive which is fresh on each boot. So the whole /etc directory is reset on reboot.

    A flash partition is mounted on /etc/zyxel, and this partition contains all persistent settings, which are not package related. The firmware backend reads a database stored in /etc/zyxel/ and adapts /etc/passwd and /etc/samba/smb.conf accordingly.

    The packages maintain their own settings, on firmwares <5.0 in /usr/local/zy-pkgs.
    The /etc/exports file actually is a symlink to /usr/local/zy-pkgs/etc/exports, which is created by the nfs start script /usr/local/zy-pkgs/etc/init.d/nfs.

    The webinterface only supports a small subset of the nfs possibilities. When editing the nfs shares, it reads the /usr/local/zy-pkgs/etc/exports file, ignores everything is doesn't know about, and writes a fresh one.

    So if you want a custom exports file, just edit it, and don't touch the webinterface anymore. Or edit the startscript to create a different symlink to your own private exports file, and synchronize that manually with the output of the webinterface.

Consumer Product Help Center