Samba share file locking

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
kkjensen
Posts: 13
Joined: 2007/01/24 18:12:58
Contact:

Samba share file locking

Post by kkjensen » 2009/02/04 14:23:24

Hi everyone,

I set up a basic CentOS4 file server at work. Samba, nfs, ADS integration on our network...pretty basic really.

It's been running for about 2 years with a couple restarts because of a UPS battery slowing kicking the bucket and a few extended power outages.


Our roaming profiles for windows are located on this machine along with our "My Documents" folders for small non-project related files.

Anyway, we've noticed that opening a file works fine in any program. The problem arises on the first save of a file. Excel produces a small pop-up window that says the file might have been changed...

[img]http://i304.photobucket.com/albums/nn192/kkjensen/filelock.jpg[/img]

This need for a confirmation (only on the first save though...subsequent save all work fine) prevents the roaming profiles on the server from getting updated properly as well as confusing some users so they end up saving multiple copies of files. :-?



I've googled and searched and am quite stumped about what is going on since the server worked perfectly for over a year and sees very little use otherwise.

FYI: samba-3.0.10-1.4E.9 and kernel 2.6.9-42ELsmp

xorg.conf
[code]

login as: kris
kris@rhserver's password:
Last login: Wed Feb 4 09:33:07 2009 from 192.168.1.121
[kris@rhserver ~]$ su -
Password:
[root@rhserver ~]# cat /etc/samba/smb.conf
#/etc/samba/smb.conf

[global]
workgroup = ELISENTECH
netbios name = rhserver
server string = File server
security = ADS
log file = /var/log/samba/samba.%m
max log size = 50
local master = no
preferred master = no
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind gid = 10000-20000
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
template homedir = /home/%U
template shell = /bin/bash
encrypt passwords = yes
dns proxy = no
realm = ELISENTECH.DOM
password server = winserver.elisentech.dom
wins proxy = no

[home]
path = /home/%U
comment = home directory
force create mode = 0775
force directory mode = 0775
writeable = yes
browsable = yes
printable = no

[profile]
force create mode = 0775
force directory mode = 0775
path = /home/profiles/%U
comment = windows profile
writeable = yes
browsable = yes
printable = no

[data]
path = /data
force create mode = 0775
force directory mode = 0775
writeable = yes
browsable = yes
printable = no
vfs object = recycle
recycle:repository = .Trash_Can/%U
recycle:keeptree = yes
recycle:touch = yes
recycle:versions = yes
recycle:maxsize = 100000000
recycle:exclude = *.tmp ~*.doc ~*.dot
recycle:exclude_dir = /tmp
recycle:noversions = *.doc *.xls

[backups]
path = /backups
force create mode = 0775
force directory mode = 0775
writeable = yes
browsable = yes
printable = no

[root@rhserver ~]#

[/code]


A million thanks in advance

kkjensen
Posts: 13
Joined: 2007/01/24 18:12:58
Contact:

Re: Samba share file locking

Post by kkjensen » 2009/02/04 14:37:44

I just figured it out...even though I don't entirely understand it.


We had to add the 'force create mode' and 'force directory mode' parameters to make sure that the permissions on files added to the workgroup working directory were properly accessible (via ACL) by the members of the MS AD domain. I guess this has an impact on the personal home drives.

I added these parameters to the [home] share and they're working properly now.

kkjensen
Posts: 13
Joined: 2007/01/24 18:12:58
Contact:

Re: Samba share file locking

Post by kkjensen » 2009/02/04 14:41:25

False alarm....still getting the error.

It's very odd because it works fine on the data share but not on the home or profile shares.....

Post Reply

Return to “CentOS 4 - Server Support”