Samba and Adobe Illustrator locking issues.

Yogesh Kulkarni yoknfs at
Mon Dec 28 20:29:05 UTC 2020


 I have a strange case of lost updates with the Adobe Illustrator .ai files
 samba server. I am writing this to validate my findings and ask if there
is a
 known workaround to this issue.
 The samba version is 4.9.5 running on debian 10.x and clients are multiple

 The customer reports an issue with multiple users working on .ai files.
Here is
 the use case -
 User A - edits a file and saves the changes
 User B - opens the file and expects the changes to be present in the file.
 (almost immediately). So, they are not co-editing, but opening the files in
 quick succession.
 However, it turns out that User B cannot see the changes.

 Observations -
 On the client side, finder shows that one or more '.tmp' files are getting
 created when a user saves the .ai file. These .tmp files sometimes go away
 other times stay till the user disconnects the share.
 Network caps indicate that the application does **not** use oplocks/leases.

 Hypothesis -
 UserA writes to the file and the application writes the updates to
.tmp file.
 UserB has their finder open and obtains a lock on the .tmp file. Now, when
 tries to rename the file from xyz.tmp to the file, since UserB has
a lock
 this operation does not go through. In a way this is a deadlock as UserB
will try
 to open the file to see the updated content, but it cannot do so, since it
 the resource and that prevents UserA from updating the content.

 Experimentation and results
 In order to verify this hypothesis and cater to the customer case, we
 renaming the locking.tdb without restarting the daemon. This addresses the
 Obviously, if we take out the locking component, there is always potential
 of simultaneous users overwriting each others data.
 I experimented with the locking = No, and checked with smbstatus, but with
 enabled, I see that a .pdf file shows as locked in output of smbstatus
 So I conclude that the samba process internally acquires the advisory lock
 the file.

 Is there a more elegant way of turning off the locking than just renaming
 locking.tdb ? We do not use clustered mode and will probably never support
that in
 the product.
 Are there any such cases seen in the field in your knowledge ?
 Is there a tried and tested solution to this issue ?

 Thanks and regards,

More information about the samba-technical mailing list