This discussion is archived
3221 Views 4 Replies Latest reply: Aug 25, 2010 10:06 PM by James_Raynor
Currently Being ModeratedAug 23, 2010 8:07 AM (in response to James_Raynor)PackageMaker can't do that. If you have an install package that installs only and exclusively to a user's home directory, then you can have "No authorization required". Otherwise, you need Admin privileges.MacBook Pro, Mac OS X (10.6.4), + iPad + MacBook 2007
Currently Being ModeratedAug 24, 2010 10:39 PM (in response to etresoft)Thanks for the reply. My package does indeed install only and exclusively to the user's home directory - unless I have overlooked something. It does run a postflight script, and this script does copy a file to the temp directory that gets created for the install - I thought such an action was allowed, but perhaps that is the cause of the failure.Mac OS X (10.6.3)
Currently Being ModeratedAug 24, 2010 10:52 PM (in response to James_Raynor)Nope, even with blank scripts it fails in the same way:
"PKInstallSandbox-tmp couldn’t be removed because you don’t have permission to access it."
My guess here is that packagemanager is attempting to perform some sort of clean up after the install is complete, which includes deleting this temp directory, but does this clean up whilst running as the user that executed the package (as opposed to root), and the clean up fails.
If anyone can shed more light on this it would be welcome.Mac OS X (10.6.3)
Currently Being ModeratedAug 25, 2010 10:06 PM (in response to James_Raynor)Ok, a colleague with more unix understanding than I helped me work through this.
When the installer is run, the entire contents of the pkg are copied to PKInstallSandbox-tmp, into a structure mimicking the one they're going to be installed into.
My project file was set up to preserve the permissions for each file and folder within an app bundle that was a component in the pkg. the problem was, some of those files were not even owner writable - they looked like -r-xr-xr-x. When the installer was run without root authorization, it was then unable to delete these files which were in subdirectories below PKInstallSandbox-tmp, hence it was unable to delete PKInstallSandbox-tmp. Since successfully doing this cleanup was (apparently) a make-or-break step in the installation procedure, the entire install failed. After discussion, the files in question didn't need to be unwritable by anyone, so I just chmod u+w'd them before putting them into the pkg and all was well.
Not sure why this issue only reared its ugly head when I had scripts activated, but it didn't appear when I had them disabled. Hence it seemed to me to be script-related, but it wasn't.
At any rate, solved.Mac OS X (10.6.3)