Unable to keep /etc/exports settings

aqsss

Cadet
Joined
Jun 24, 2022
Messages
3
Hi all,
I tried to append the following options to /etc/exports
Code:
sync,all_squash,anonuid=1000,anongid=1000


It works well. But when I reboot the server, it will be overwrite back to the original options.

Is there any workaround so I can keep the /etc/exports from being overwritten by Scale?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You need to script your change either to use something like sed to append the line with the wanted addition or to have a copy to your liking stored somewhere and have the script copy it from a pool location to the correct location (and chmod/own to the right settings).

Then launch that script as a postinit task.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
You need to script your change either to use something like sed to append the line with the wanted addition or to have a copy to your liking stored somewhere and have the script copy it from a pool location to the correct location (and chmod/own to the right settings).

Then launch that script as a postinit task.
The exports file may be replaced when starting / stopping the NFS service. Perhaps I'm missing something, but I don't see anything in the exports line that can't be set via the webui. "mapall uid" "mapall gid".
 
Top