Re: FSCopyObjectSync and Samba, error -54
Re: FSCopyObjectSync and Samba, error -54
- Subject: Re: FSCopyObjectSync and Samba, error -54
- From: Bucanek James <email@hidden>
- Date: Tue, 26 Aug 2008 08:21:27 -0700
If anyone was curious, this problem turned out to be an impedance
mismatch between the file sharing modes used by HFS+/AFP and the file
sharing modes used by SMB (or at least the translation of those mode
by Samba). Thanks go to James Peach in helping me run this to ground.
The problem was that I had a file that was being opened with
fsRdWrShPerm; that should allow other processes to read or write to
the file at the same time. While it was still open, I called
FSCopyObjectSync which (I assume) would open the file fsRdPerm (or
something equivalent). On HFS+ or AFP volumes this worked just fine.
But on an SMB volume, the Carbon permissions got translated into
something like read+write and read-only+no-write. The FSCopyObjectSync
would fail with a permissions error because it was trying to open the
file exclusively read-only while some other process had the file open
for writing.
I don't modify the file while FSCopyObjectSync is running, so the
workaround for this particular file was to open it fsRdPerm while the
FSCopyObjectSync is working. Once FSCopyObjectSync is done, I close
the file and reopen it fsRdWrShPerm.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden