Samba server not allowing windows client to save files correctly
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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?
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?
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.
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:
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.