LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-26-2007, 06:03 PM   #1
royce2020
Member
 
Registered: Jan 2003
Posts: 81

Rep: Reputation: 15
Question Samba server not allowing windows client to save files correctly


Those of you who have been paying attention to my posts latly, will know that I have recently deployed a Samba server on Debian.

The problem that I am having at the moment is that if a windows client opens a text file from a particular folder (that is in a mapped network drive, I haven't tryed unc paths) with notepad, changes the file, closes notepad, selects "yes" to save changes. At this piont rather than saving the file (as it does for other files) notpad reports that it cannot create the file (though it already exists) and opens a "save as" dialog which if the user just hits "save", notepad says the file exists, and asks if the user would like to overwrite it.

This might not sound like a huge problem, but the users have to edit hundreds of these files in the course of a day, and this problem efectivly doubbles the amount of work they have to do.
The windows file server didn't do this, and if you copy the file (from windows) to a diferent folder the samba server dosen't do it either.

Are there some settings on this particular folder that are causing this?
 
Old 09-26-2007, 07:04 PM   #2
royce2020
Member
 
Registered: Jan 2003
Posts: 81

Original Poster
Rep: Reputation: 15
I've been tinkering with the permisions of a single file, so now this file a windows client can change and just close the window.
The problem is I changed a lot of stuff, now I can't remember which setting exacly I changed. I tryed the most likly things on annother file, but this second one still does the same thing.

Is there any way of copying file permisions from one file to annother?
 
Old 09-27-2007, 04:54 PM   #3
royce2020
Member
 
Registered: Jan 2003
Posts: 81

Original Poster
Rep: Reputation: 15
I've discovered that if you try to delete or rename the file using CMD, it reponds: "The process cannot access the file because it is being used by another process." which is odd considering I can overwrite it. Also, I can delete the file from inside linux while it's aparently locked. smbstatus reports that it is "DENY_NONE" as apposed to "DENY_WRITE" which is what I'd expect if it was samba doing the locking, but our windows unlocker resonds that there are no locking handles for this file, even when the message box saying that it cannot create the file is on the screen. what's going on?

Last edited by royce2020; 09-27-2007 at 04:56 PM.
 
Old 09-30-2007, 03:45 PM   #4
royce2020
Member
 
Registered: Jan 2003
Posts: 81

Original Poster
Rep: Reputation: 15
I found the problem. When all the files where transfered from the windows file server to the Samba server, all the locks (made by the win file server) stayed in place. Stoping the Sama deamons, deleting all the lock (*.tbd) files, then restarting the deamons did the trick.
Not sure what caused it in the first place, but I'll keep my eyes open.
 
Old 09-30-2007, 10:49 PM   #5
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Glad you solved the problem and posted the result. I had this issue a long time ago when I was trying to share some files on a Windows 2000 machine. I ended up giving up and upgraded the machine to Windows XP and the problem went away, but it's good to know how to work around it.
 
Old 11-06-2007, 08:10 PM   #6
royce2020
Member
 
Registered: Jan 2003
Posts: 81

Original Poster
Rep: Reputation: 15
This dam problem has started cropping up again.
It's being caused when one windows client opens it, modifyes it, then closes it, but the lock remains.
I could concevably solve this problem by stopping the saba deamons and deleting the locks every once in a while, but that seems ineficient (and it plays havoc with the PSTs sotored on it).
 
Old 11-07-2007, 12:30 PM   #7
strick1226
Member
 
Registered: Feb 2005
Distribution: CentOS, Fedora, OS X, SLES, Ubuntu
Posts: 273

Rep: Reputation: 51
I've not run into this problem myself (yet), but this information on file locking from the official samba docs may prove useful:

http://us1.samba.org/samba/docs/man/...n/locking.html

Looks like oplocks can cause a lot of issues, and the general recommendation is to disable them entirely for busy shares...

HTH
 
  


Reply

Tags
samba windows


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
samba print server for windows network, cannot save printer setting lnthai2002 Linux - Networking 0 07-25-2006 10:38 AM
How do windows client have access to a Samba server MandrivaUser Linux - Software 5 02-08-2006 02:44 PM
Windows XP client to a Samba server jborn Linux - Networking 1 12-10-2005 11:35 PM
FC3 Samba Server + Windows ME Client DoubleOTeC Linux - Networking 4 07-25-2005 11:46 AM
veryoften client are not able to paste files to my samba server sparsh Linux - Networking 0 05-10-2003 03:30 AM


All times are GMT -5. The time now is 02:21 AM.

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