Thursday, January 31, 2008

smb.conf Overwrites

Last night.

As previously mentioned I plugged a LaCie external USB hard disk into the MBW and it appeared via hotplug. Then created a samba share for it using the Drive Managment tool in the MBW web-admin console.

But after rebooting, the external drive is gone again. I mean, how annoying is that!?

The drive management tool writes its updates to a shares.inc file which is included by the main smb.conf file. (All samba config is in the /var/oxsemi directory). On rebooting, both smb.conf and shares.inc have last update times set during boot up (or possibly shutdown? To check!). The shares.inc file has been overwritten, keeps all the shares on /shares/internal but is missing my lovely new backups share!?

Results so far
  1. I don't think Samba overwrites the files as a matter of course. It may alter file permissions for security when nmbd or smbd starts up but not change the contents?
  2. there are some "tidy up external shares" perl scripts as part of the usr/www/lib area which is where the web admin tools live. But disabling lighttpd on start up (which should prevent any .pl scripts from running) makes no difference. (Maybe it's a shutdown script as mentioned above?) Even then the script is meant to check if the mount point is listed in /etc/mtab, which it is.
Cock-a-doodle doo!

No comments: