[Samba] Randomly occurring file losses on samba share

Rowland Penny rowlandpenny at googlemail.com
Wed Apr 8 11:07:48 MDT 2015


On 08/04/15 17:34, Andreas Huppert wrote:
> Hello,
>
> having migrated from OSX Server with AFP filesharing, we've experienced a problem with randomly occurring file losses on our samba server. Due to the fact we were not able to reproduce the problem reliably, we are quite clueless what could cause this behavior and therefore desperately looking for any hints.
>
> The Server in question is running Ubuntu 14.04LTS with the Version of Samba being '4.1.6+dfsg-1ubuntu2.14.04.7'. It is set up to retrieve its users from an LDAP directory using libnss-ldapd while authentication is done via Kerberos. File permissions are controlled by POSIX-ACLs on top of an ext4 filesystem.
>
> On the client side, there are clients running Mac OSX 10.9.5 or Mac OSX 10.10.2. The connection to the server is established using built-in 'Finder' functions.
>
> Server and clients are provided with latest updates.
>
> The Problem was recognized while working on MS Office documents, whereby the affected documents were first saved and closed by one client, later opened by another client (while the first client was still connected to the share), and disappeared shortly after the second client saved (and closed) the edited file. The file can be restored via extundelete but then may contain content of another file. (In a particular example a restored .docx file contained content of a .xlsx file that was edited in a timely manner on the same share).
>
> We're unsure whether the problem is located in Finder, MS Office or samba itself, but quite confident it is related to the new samba environment, because this behavior was never observed before, with nearly identical share structure, when AFP was used. Maybe it's worth to note that normal users are not allowed to write to the first level of a share.
>
> Relevant config-files are written down below.
>
> Kind regards,
>
> Andreas Huppert
>
>
>
> Client configuration:
> #/etc/nsmb.conf
> [default]
> smb_neg=smb2_only
>
>
> Server configuration:
> #/etc/samba/smb.conf
> workgroup = WORKGROUP
> server string = %h server (Samba, Ubuntu)
> dns proxy = no
> log file = /var/log/samba/samba.log
> max log size = 10000
> syslog = 10
> syslog only = yes
> log level = all:1
> ldap ssl = start tls
> disable netbios = yes
> usershare allow guests = no
>
> security = ADS
> realm = REALM
> kerberos method = dedicated keytab
> dedicated keytab file = /etc/samba/keytab.keytab
>
> nt acl support = yes
> hide unreadable = no
> encrypt passwords = yes
> obey pam restrictions = no
> unix password sync = no
> ldap ssl ads = yes
>
> invalid users = root xxxx
> inherit acls = yes
> inherit permissions = yes
> map acl inherit = no
> inherit owner = yes
>
> [Share]
> path = /path/to/share
> writeable = yes

You seem to have set samba up as an active directory client, yet you 
don't seem to be using AD. This could have something to do with your 
problem.

Rowland



More information about the samba mailing list