LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-11-2010, 04:51 AM   #1
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
Files always locked using Windows Clients with Samba + NFSv4/NIS Server


Hello everyone,

this is not a question, it's a solution. I had to search tons of old mailing lists till I accidentally stumbled across the solution for this problem and I want to spare other's the effort.

The problem is the following:

When Samba shares a folder that is mounted using NFS (v4 in my case), then Windows Clients are unable to write to the file unless the setgid bit is set. Windows clients can create and delete the file, but not write to an already opened file. Linux clients to not appear to be afflicted by the problem.

To fix this, I first tried to force all clients to set the setgid bit using force create mode = 02000 in the config file. Again, this only worked for linux clients. Windows clients ignored the directive somehow.

The problem is rooted in the way samba and nfs file locking conflicts. To make it work, the strict locking feature of samba needs to be turned of. Appending the following to my smb.conf's general section fixed the problem:

Code:
...
lock directory = /var/lock/samba  
locking = yes  
strict locking = no
...

Hope this helps someone.

Cheers.

Last edited by ichrispa; 10-11-2010 at 04:52 AM.
 
Old 10-12-2010, 12:22 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Thank you for sharing your solution, it'll come in handy.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba server used as a PDC with XP and Windows 7 clients karozans Linux - Server 1 05-26-2010 04:00 PM
Can NFSv4 server translate symlinks for clients? onymouse Linux - Server 3 12-25-2009 06:44 PM
Copying files from windows clients to linux server sarajevo Linux - Networking 2 05-17-2008 01:18 AM
SUSE 9 and 10 NIS clients with RedHat 8.0 NIS server not working fishsponge Linux - Networking 0 11-29-2005 07:43 AM
samba¦server¦with¦windows¦2000¦clients dabash Linux - Networking 3 08-23-2005 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration