Samba and NFS locking problem and permissions
Solved an odd problem today. Problem 1: File locking My samba share directory on my ubuntu box has an nfs mounted directory within it. When copying files into it from Linux, everything was fine. However, Windows complained of error number 0x80070021 (something about another process locking a portion of the file). It turns out Samba was trying to lock the file again once nfs had got its hands on it. Solution: in smb.conf, under [global], add 'strict locking = no' and the problem disappears! Problem 2: File permissions Linux coped perfectly fine already, possibly because of the file_mode=0777 and dir_mode=0777 that I'd added to fstab. However, Windows failed to create the files with the correct permissions. Solution: under [mediashare], add 'create mask = 0775' and the permissions are right under Windows too!