Author Topic: File locking issue samba  (Read 8524 times)

pete83

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +0/-0
    • View Profile
File locking issue samba
« on: February 23, 2012, 10:53:52 am »
I'm using zentyal 2.1 and my users have problems with saving MS Office files on the samba shares:

This is a example of the problem we also have, which I found here:

If a user opens an existing file, smbstatus looks like this:

Code: [Select]
10781        11021      DENY_WRITE 0x2019f     RDWR       NONE
 /usr/test/dssg   test1234ecg2.pptx   Fri Oct 23 17:21:52 2009
10517        11021      DENY_NONE  0x100001    RDONLY     NONE
 /usr/test/dssg   .   Fri Oct 23 17:06:08 2009
10517        11021      DENY_NONE  0x100001    RDONLY     NONE
 /usr/test/dssg   .   Fri Oct 23 17:06:08 2009
10781        11021      DENY_NONE  0x100001    RDONLY     NONE
 /usr/test/dssg   .   Fri Oct 23 17:16:19 2009
10781        11021      DENY_NONE  0x100001    RDONLY     NONE
 /usr/test/dssg   .   Fri Oct 23 17:16:19 2009
10781        11021      DENY_WRITE 0x3019f     RDWR       EXCLUSIVE+BATCH
 /usr/test/dssg   ~$test1234ecg2.pptx   Fri Oct 23 17:21:52 2009

Notice, there are both test1234ecg2.pptx and ~$test1234ecg2.pptx.

If the user saves, once in awhile (some as often as 1 in 4, some more like 1 in 20 saves), they'll be told that the file is read-only and get offered to save as a new file name. When this happens, smbstatus only shows the ~$test1234ecg2.pptx version of the file.

Is there someone with similar problems?


Running: Zentyal 2.0.23

Mittelerde

  • Zen Warrior
  • ***
  • Posts: 153
  • Karma: +8/-0
    • View Profile
Re: File locking issue samba
« Reply #1 on: February 23, 2012, 12:23:54 pm »
hello,
Yep i got same problems with DBF Files

a solution is postet there, but my issue with multiuser access on some DBF files will not be fixed.


« Last Edit: February 23, 2012, 03:23:43 pm by Mittelerde »

pete83

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: File locking issue samba
« Reply #2 on: February 23, 2012, 04:04:26 pm »
I found this solution which works for my users.

Solution:
http://lists.samba.org/archive/samba/2006-October/126653.html

I've added this in the smb.conf.mas file in the "foreach my $share (@shares)" section:

Code: [Select]
strict locking = yes
oplocks = no
level2 oplocks = no
kernel oplocks = no

@Mittelerde, does this work for you?

The only thing is that I also was trying to get offline files to work with win 7 clients and that doesn't work any more. http://forum.zentyal.org/index.php/topic,9259
« Last Edit: February 23, 2012, 04:24:01 pm by pete83 »
Running: Zentyal 2.0.23

Mittelerde

  • Zen Warrior
  • ***
  • Posts: 153
  • Karma: +8/-0
    • View Profile
Re: File locking issue samba
« Reply #3 on: February 23, 2012, 06:59:17 pm »
ey cool - i check it out tomorrow - thank you for this hint
« Last Edit: February 23, 2012, 07:12:12 pm by Mittelerde »

pete83

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: File locking issue samba
« Reply #4 on: February 24, 2012, 02:37:06 pm »
I don't get it any more. Suddenly my users started to complain about the problem again. Now I've changed everything back to the original Zentyal settings and there are no complains any more.

I have to wait for Zentyal 3.0 to get offline files working I guess.

Running: Zentyal 2.0.23