Showing posts with label external. Show all posts
Showing posts with label external. Show all posts

Friday, February 1, 2008

smb.conf

Phew!

Startup script /etc/init.d/S27-shares-cleanup was calling the removeExternalShares.pl perl script. It should probably be trying to be clever and only removing shares that it finds under /shares/external that aren't listed under /proc/mounts. It's sufficient for now just to comment out the removeExternalShares line.

Thursday, January 31, 2008

smb.conf Ovewrites. It's not finished...

root> /etc/init.d/lighttpd.sh stop

which takes down lighttpd and the nasMaster.pl FCGI script.

Then edited /etc/init.d/network_servers.sh to disable start and stop of lighttpd at startup and shutdown.
Then manually updated /var/oxsemi/shares.inc to add a new share.
Then

root> reboot

When the machine comes back up, the file has not been overwritten. A-ha! One of the last things nasMaster.pl does before entering the CGI dispatch loop is invoke Service::Shares->createDefault() but all this does, as far as I can see is delete and recreate the [PUBLIC] share.

Service::Shares also defines a deleteAllExternal() method which would certainly hae the same effect I'm seeing, but where is it called...?

I feel like Columbo. I know who did it and now just need to badger them into making a mistake to get the proof I need.

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!