site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On 2010 Jul 24, at 23:40, Michael Smith wrote:
Who are you copying as? Only root can assign ownership (as opposed to taking ownership, which is intrinsic for new files, and can be granted with an ACL).
OK, well, maybe whomever wrote copyfile(3) wasn't really thinking about what would happen if it was used in a (root?)-privileged helper tool like mine, and thus the behavior is unpredictable. So, following my grandmother's advice of "If it isn't precisely documented, don't rely on it", I added some code in my tool to call chown(3) after copyfile(3), and of course that fixes the unpredictability. Thanks, Michael. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com