Bug 4890 - File locking problem
File locking problem
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: File Services
3.0.25a
x86 FreeBSD
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-16 07:24 UTC by vwdragon
Modified: 2007-09-21 11:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vwdragon 2007-08-16 07:24:15 UTC
Hello..

File server freebsd 6.2-STABLE + samba-3.0.25a + ldap + acls

Problem:
I've a situation where file locking does not seem to be functioning as expected, in that
more than one user can open and write to a file without any
notifications being displayed about the file already being opened by
another user.

I have two Windows XP clients accessing the same shared file, user1 has
the file open. User2 then opens the
same file, receiving no warnings about the file being open by another
user. File is modified by user1 and saved and remains open. File then
modified by user2 and saved. File closed and opened by user1 who
sees only modifications made by user2.

user1 (WinXP) open test2.ods

smbstatus:
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock SharePath   Name   Time
--------------------------------------------------------------------------------------------------
14758        10004      DENY_WRITE 0x2019f     RDWR   EXCLUSIVE+BATCH /work/samba/bazafirm   test2.ods   Wed Aug  1 17:50:15
14758        10004      DENY_NONE  0x100001    RDONLY     NONE
/work/samba/bazafirm   .   Wed Aug  1 17:49:47

user2 (WinXP) open file:
smbstatus:
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock SharePath   Name   Time
--------------------------------------------------------------------------------------------------
14787        10002      DENY_WRITE 0x2019f     RDWR   EXCLUSIVE+BATCH /work/samba/bazafirm   test2.ods   Wed Aug  1 17:55:38
14787        10002      DENY_NONE  0x100001    RDONLY     NONE /work/samba/bazafirm   .   Wed Aug  1 17:55:12


But when I use option "force user = root" tha file lock works OK!!!

user1 open file test3.ods

Samba version 3.0.25a
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock    SharePath   Name   Time
--------------------------------------------------------------------------------------------------
2103         0          DENY_WRITE 0x2019f     RDWR      EXCLUSIVE+BATCH  /work/samba/bazafirm   test3.ods   Thu Aug 16 05:32:28


user2 open file test3.ods (file is open "read mode")

smbstatus:
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock    SharePath   Name   Time
--------------------------------------------------------------------------------------------------
2103         0          DENY_WRITE 0x2019f     RDWR       LEVEL_II    /work/samba/bazafirm   test3.ods   Thu Aug 16 05:32:28


Why? This is working only if I set option "force user = root"???