I can enable NFS from the GUI, however it has all_root_squash by default.
I need no_root_squash for rsync.
I can change /etc/exports but I dont know how to restart the NFS service on mycloud or how to get anything to persist. Over time, my edits it will get changed back on their own too.
I found a guide about editing /usr/local/config/config.xml and putting in a boot script. I tried this putting in something to change /etc/exports but that doesnt seem to work either.
The command syntax to control services are pretty similar across all variants of Linux; that Redhat page is just a handy example of good documentation.
Those commands (service [servicename] [start|stop|status|restart]) work on Gen 1 v3/v4 MyClouds.
The Gen2/v2 isn’t really running a ‘proper Linux’, which may be why those commands don’t work. Sorry; I don’t have a Gen2/v2 MyCloud so can’t advise further.
I tried editing exports but I didn’t know how to restart nfs and apply the setting. Also, exports gets overwritten eventually anyways. I then tried CHROOT, but in I couldnt get nfs and rpc to work right. In debugging that, I discovered the “exportfs” command which allows you to reapply exports. Then all I had to do was replace the exports file. Once I realized that, everything fell into place.
I disabled NFS in the gui hoping it would avoid issues with periodic replacing of files.
I used the bootscript workaround that was posted elsewhere on the forum to be able to run my commands on boot.
I noticed I can’t replace the exports file too early so I wait til the system creates an exports file, then I copy my own in and then run exportfs -r
I basically just used the following commands at bootup:
while [ ! -f /etc/exports ]; do sleep 1; done
cp -f exports /etc/exports
exportfs -r
I havent done too much testing to see if my exports file eventually gets overwritten and even if that happens, if the new exports file is reapplied. Hopefully not.