Looking for a workaround regarding a bug in NSFileManager when dealing with AppleShare
Looking for a workaround regarding a bug in NSFileManager when dealing with AppleShare
- Subject: Looking for a workaround regarding a bug in NSFileManager when dealing with AppleShare
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 7 Apr 2005 20:48:45 +0200
The problem:
------------
NSFileManager looks not to support AppleShare remote volume correctly
in the following case.
The players:
------------
Machine A is running Mac OS X 10.2.8. User U_A is logged. A bootstrap
process BP is running. There's somewhere a file F which can be read by
anyone and who has the following permissions:
U_A staff rw-r--r-- (size = 212 bytes)
Machine B is running Mac OS X 10.3.7. Personal File Sharing is enabled.
There's a User U_B account on the machine. On Volume V_B there is a
folder FOL_B with the following permissions:
U_B staff drwxrwxrwx
The scenario:
-------------
User U_A mounts the remote volume V_B from Machine B using User account
U_B.
The bootstrap process uses NSFileManager method
copyPath:toPath:handler: to copy file F to folder FOL_B. The toPath:
parameter last component is different name than the original name of
file F.
The result:
-----------
Failure.
A file with the new name is created in folder FOL_B. It's empty and has
the following (correct?) permissions set:
U_B staff rw-r--r-- (size = 0 bytes)
From what I'm trying to understand, the problem is potentially coming
from the fact that the NSFileManager is first creating the new file,
setting its permissions and then filling it. Since the permissions are
preventing any other user than U_B to write in it, the copy fails.
IMHO, this is a potential bug as since the permissions of FOL_B are 777
in the destination folder and F is 644, any user account shall be able
to copy the file into FOL_B.
Question:
---------
Would there be a workaround for this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden