I have two servers, bs-svr02 and scan-svr01, each one has a share called 'report' into which our backup app writes a nightly report (report.csv). I've written a script which reads these files and emails me the info. I've just added a line where it deletes the file on exiting, so I know when the job failed to run.
This seems to work on the share on scan-svr01 but not bs-svr02. I am mounting them as below:
//bs-svr02/reports /mnt/glasgow/reports smbfs defaults,rw,credentials=/etc/avi.smbpass,file_mode=0777,dir_mode=0777 0 0
//10.45.0.1/reports /mnt/scanachrome/reports smbfs defaults,rw,credentials=/etc/avi.smbpass,file_mode=0777,dir_mode=0777 0 0
(scan-svr01 is at Scanachrome, bs-svr02 is at a site in Glasgow)
Each has the same credentials file, and the same access rights, and I can read both, I just can't delete from /mnt/glasgow/reports
jup-linux2:/home/avi# cd /etc/
jup-linux2:/etc# umount /mnt/scanachrome/reports/
jup-linux2:/etc# mount /mnt/scanachrome/reports
jup-linux2:/etc# cd /mnt/scanachrome/reports
jup-linux2:/mnt/scanachrome/reports# rm -f ./report.bak.csv
jup-linux2:/mnt/scanachrome/reports# umount /mnt/glasgow/reports/
jup-linux2:/mnt/scanachrome/reports# mount /mnt/glasgow/reports
jup-linux2:/mnt/scanachrome/reports# cd ../../glasgow/reports
jup-linux2:/mnt/glasgow/reports# rm -f ./report.bak.csv
rm: cannot remove `./report.bak.csv': Permission denied
jup-linux2:/mnt/glasgow/reports# ls -l
-rwxrwxrwx 1 root root 847 2009-01-27 13:40 asc.gif
-rwxrwxrwx 1 root root 15776 2009-01-27 13:40 Back.jpg
-rwxrwxrwx 1 root root 848 2009-01-27 13:40 desc.gif
-rwxrwxrwx 1 root root 524 2009-01-27 08:45 report.bak.csv
-rwxrwxrwx 1 root root 524 2009-01-27 13:40 report.csv
-rwxrwxrwx 1 root root 20238 2005-12-14 14:23 response.xsl
The mounting and unmounting above didn't result in anything being written to /var/log/samba/log.smbmount
The permissions on the mountpoints are the same, too (owned by root:root and permission of 777), as are all the files they contain.
The two Windows servers are in the same domain (SGL) and I am mounting the shares with my domain account, which is administrative. I can play with these files when accessed from a Windows box in the domain.
My smbclient is at version 2:3.2.5-4, I am doing this on a Debian box with everything from apt-get.
So, what am I doing wrong?