Locking propigation probelm samba to netatalk & netatalk to samba
m.brodbelt at acu.ac.uk
Wed Oct 18 10:22:14 GMT 2000
Mike Fedyk wrote:
> Take a look at this output from lsof:
> smbd 11490 0 8u REG 3,3 55296 1136647 Maintenanc.fp5
> afpd 31010 0 2u REG 3,3 3207 1136655 auction - envelope.rtf
> afpd 31010 0 5u REG 3,3 4156 1136656 Word Work File L 1
> afpd 31010 0 8u REG 3,3 55296 1136647 Maintenanc.fp5
> smbd 31386 0 9u REG 3,3 4156 1136656 Word Work File L 1
> This is showing a rtf file open in word on mac and windows, both writable. I am
> able to save on one while the other has the same file open. The information
> isn't transferring between samba and netatalk. Locking works within samba and
> within netatalk, meaning mac-mac locking conflicts are reported and smb-smb
> locking conflicts are too. But if you have the same file open in windows and
> mac, there isn't any warning!
As I understand it, Samba 2.0.7 implements oplocks for windows clients,
but those locks do not propagate to the underlying Unix system. This can
cause locking problems with Unix apps and windows apps accessing the
same files, which is essentially what you are seeing. Neither Netatalk
or Samba have any idea that the file is locked by the other.
One of the new features of Samba 2.2 is the mapping of oplocks to POSIX
locks. From the release notes:-
Rewritten internal locking semantics for more robustness.
This alpha supports full 64 bit locking semantics on all
(even 32 bit) platforms. SMB locks are mapped onto POSIX
locks (32 bit or 64 bit) as the underlying system allows.
This should mean that, assuming your undelying system supports POSIX
locks, then Samba will have done its bit with regard to this. You still
need Netatalk to honour the POSIX locks, and also to map Mac locks to
POSIX locks to be able to use this sort of setup with impunity. I have
no idea what the state of this sort of thing is within Netatalk - maybe
someone on the Netatalk list will know this...
I'd suggest that you make Mac and Windows users use different shares for
write access. Allow both groups read-only access to the others shares,
and if they need to edit a file, they can make a copy. Otherwise, you're
probably in for large amounts of pain....
Unsubscribe? mail -s unsubscribe debian-user-request at lists.debian.org < /dev/null
More information about the samba