[Samba] Locked Files issue.

Yanni Goudetsidis y.goudetsidis at mail.cryst.bbk.ac.uk
Mon Jun 23 10:31:34 MDT 2014

Hello everyone

I moved my samba (3.6.9-168.el6_5) setup to new hardware  and since
the move a user can not write to the shared folders. When the file is 
opened by the user "smbstatus" shows:

Locked files:
Pid          Uid        DenyMode   Access      R/W Oplock           
SharePath   Name   Time
1772         2882       DENY_NONE  0x100081    RDONLY NONE             
/d/OfficeDrive/u/shared   Finance etc   Mon Jun 23 11:59:29 2014

1772         2882       DENY_WRITE 0x2019f     RDWR NONE             
/d/OfficeDrive/u/shared   Finance etc/POS.xlsm Mon Jun 23 11:59:56 2014

1772         2882       DENY_NONE  0x100081    RDONLY NONE             
/d/OfficeDrive/u/shared   .   Mon Jun 23 12:00:11 2014

The user opens an excel file and gets the message that the file is read 
only, and that he needs to click 'enable editing'. Editing is then 
enabled but the file can not be saved back, regardless of any changes 
made. The message that comes up is "The file is currently in use. Try 
again later."

I've asked the user log in to another win7 machine and the problem persists.

Is there anything I could try to troubleshoot this file locking problem, 
please? My google search suggested:

1. to disable SElinux, which is done
2. set deadtime parameter correctly, which I think I did, although I 
couldn't see how this parameter could be helpful in my case. However it 
did not help.

Could someone please help me?

Here is my smb.conf:

workgroup = SCI
server string = Samba Server Version %v on (%L)
bind interfaces only = yes
time server = yes

# logs split per machine
log file = /var/log/samba/%m.log
# max 50KB per log file, then rotate
max log size = 50
timestamp logs = yes
log level = 2

security = user
passdb backend = smbpasswd:/etc/samba/smbpasswd
encrypt passwords = yes

domain master = yes
domain logons = yes

logon home = \\%L\homes
logon drive = I:
logon script = SCI2.bat
logon path = \\%L\profile\
local master = yes
prefered master = yes
os level = 34
wins support = yes
guest account = admin
admin users = samba

         comment = Home Directories
         browsable = no
         writable = yes
         path = /d/pcuser/%u
         create mode = 644
         guest ok = no

         comment = Network Logon Service
         path = /d/ntprofile/logon
         browsable = no
         writable = no

         path = /d/ntprofile/users/%u
         create mode = 0700
         directory mode = 0700
         writable = yes
         browsable = no
         guest ok = yes

         path = /d/ntprofile/users.v2/%u
         create mode = 0700
         directory mode = 0700
         writable = yes
         browsable = no
         guest ok = yes

    browsable = no
    create mode = 775
    directory mode= 775
    force group = ubcg49
    writable = yes
    read only = no
    guest ok = no
    valid users = @office_shared

As you can see only the group ubcg49 have access to the "officeshared" 
folder and I can confirm that the user is member of this group.

Any help/advice is really appreciated.

Thank you


Yanni Goudetsidis
Computer Support Group
Department of Biological Sciences,
Birkbeck College, Malet Street,
London, WC1E 7HX
Email: ubygou01 at mail.cryst.bbk.ac.uk

More information about the samba mailing list