Error opening smb.conf when changed by rockstor UI

I have noticed that when smb.conf gets changed though the rockstor UI, Samba won’t startup. It will throw an error opening smb.conf file.
Looking at the file, everything appears to be OK.

I threw the file away and used vi to create a new smb.conf file. Samba starts up without any problems.

I added some settings through the UI. Samba doesn’t start anymore. Added the same settings manually through vi. Samba starts without any problems.

I can only think that this has something to do with character sets, but I am running en-US, how much more basic can it get.

I have a workaround, so no burning issue.

Hi @Marcel_Rutjes and welcom to Rockstor!

Can you please provide some logs and your smb.conf file?

Thanks
M.

Did some digging into the system.

It appears that when editing smb.conf through the UI, the process
/usr/bin/python /opt/rockstor/bin/gunicorn
keeps the smb.conf file locked in some way.

Check "fuser smb.conf" for filelocks after doing the UI update.

When I move smb.conf to another name and then move it back, the lock is gone and smb will start just fine.

smb obviously doesn’t like the lock, hence the error opening smb.conf.