[Samba] File size is sometimes 0 after saving

Matthias Heinz matthias.heinz at uweschneider.de
Mon Jun 16 08:47:19 MDT 2014


Hello everyone,

we have a problem with our samba setup for over a year now, since we 
rebuilt the complete infrastructure and set up everything from scratch. 
We've searched pretty long for a solution, but we couldn't figure out 
where the problems happen and nobody else seems to have such problems, 
although we don't think that our setup is very uncommon and search quite 
a lot for helping hints.

Our setup uses a ldap server and ldapsam as passdb backend to 
authenticate users with samba. At the same time ldap is used as pam 
login method, so the user IDs can be mapped to user names. The data 
itself is stored locally, no NFS or anything else in place.

kernel oplocks are enable, dos filemode too.

On the shares we're using "force group" to enforce a common group so 
that all allowed users for this share are able to edit files.


What we experience is that some programs (e.g. Inkscape) have problems 
saving files sometimes. It manages to access the file and to erase 
everything in it (that's my guess), but then fails somehow to write it 
again, leaving the file size 0. Most oft the time this happens when the 
file itself belongs to another user (as I said above, we only enforce a 
common group on the share). I say most of the time, because I only can 
reproduce it when the file itself belongs to another user. A colleague 
mentioned that he had problems with his own files, too, but I have no 
proof here.

When saving works - which it does sometimes, don't know how often though 
-, the owner is not changed, the normal behaviour on a UNIX-like system.

This happens with samba 3.6.6-6+deb7u3 (from Debian Stable). If you 
suspect a bug with oplocks, linux kernel version is 3.2.0-4-amd64.

It may not be important, but copying files from one of our computers to 
a share is pretty slow, too. Maybe excessive calls to the LDAP system, 
which could cause the above problem and slows everything down?

I've also increased the log level and had a look at the entries, when 
the problem happened. But there was nothing different to a normal save 
(as far as my unskilled eyes could see). This really happens only with a 
few programs, not all. As if they're requesting something that can't be 
delivered all the time and then they're just stopping to save the files 
and display an error. (At least some of them do this, so we know that 
something went wrong. Then we've got to save with a different name, 
delete the 0 sized filed, which is possible and rename the other file).


Has anyone ever encountered such a problem and has any idea how to 
address this?


Best regards
Matthias

PS: I hope I didn't scare you away with this pretty long post.

-- 
Matthias Heinz
Uwe Schneider GmbH
Heegwaldring 12
63694 Limeshain
Tel.: +49 / 6047 / 98 65 21
FAX.: +49 / 6047 / 98 73 96
E-Mail: matthias.heinz at UweSchneider.de

Uwe Schneider Gesellschaft für innovative
Produkte der Computertechnik mbH
Sitz der Gesellschaft: Limeshain
Registergericht: Friedberg HRB 5895
Geschäftsführer: Uwe Schneider


More information about the samba mailing list