LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-27-2009, 08:26 AM   #1
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Rep: Reputation: 38
Can delete files in one smb share but not in another - using cifs.mount in active dir


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:
Code:
//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

Code:
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
total 40
-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
jup-linux2:/mnt/glasgow/reports#
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?
 
Old 01-28-2009, 05:53 AM   #2
mwx
Member
 
Registered: Jan 2009
Posts: 35

Rep: Reputation: 0
Have you gone through and fine-toothed your smb.conf and made sure the share settings are identical? I know it seems pretty obvious - but I thought I would ask.
 
Old 02-03-2009, 07:12 AM   #3
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Original Poster
Rep: Reputation: 38
The two boxes doing the sharing (scan-svr01 and bs-svr02) are Windows boxes. The only Linux box in the equation is the one doing the mounting.

I should probably have mentioned this above...
 
Old 02-04-2009, 07:27 AM   #4
mwx
Member
 
Registered: Jan 2009
Posts: 35

Rep: Reputation: 0
I really am a novice - just trying to help and learn at the same time. This one is out of my league.

The only thing I can think of is the "alter" permission setting on the windows box that won't allow the delete. There is a windows setting when the share is created that says "Allow users to change...." If that is set to "No" it will allow the read - but not the delete..
 
Old 02-12-2009, 05:34 AM   #5
chitambira
Member
 
Registered: Oct 2008
Location: Fife
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 49
You have shared the reports folders on two windows servers right?
You mounted the shared folders on a linux box right?
You now want users to access these shares through the linux box(like dfs) right?
The linux box is running samba with an smb.conf right?
You have in smb.conf nt acl support = yes rihgt?
Note that Windows ACLs take precedence over the linux/samba permissions, Make sure that the files are not marked readonly in windows and that their acls are set properly)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount cifs share problems BarryLinux Linux - Newbie 11 06-04-2012 12:42 AM
can access a share through smbclient but not though mount.cifs seuchato Linux - Server 2 10-13-2007 09:24 AM
Can't mount nfs- or cifs-share rw in Debian pingu Linux - Networking 0 07-03-2007 07:43 AM
Azureus: Cannot use a smb network share as the default download DIR. tlawlessrr Linux - Software 1 08-02-2004 07:00 PM
Can't delete folders in smb share echowell Mandriva 0 04-07-2004 01:38 PM


All times are GMT -5. The time now is 03:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration