Hi, We had some customers reporting that our product is not working. A further investigation turned out that the file permissions of the / Library/LaunchAgents folder was not the default one any more. Some other product that installed something into it had changed the permissions and preventing launchd to iterate the items in this folder to launch it. What is the best way to prevent this situation? Should my installer always check for the correct default permissions of /Library/ LaunchAgents & /Library/LaunchDaemons and change it back in case they were altered (what about compatibility issues with future OS X versions)? There is still a chance that the user runs the installer of the 'faulty' product at a later time and I have the same situation. Even if my daemon would check the permission bits of the /Library/ LaunchAgents folder at startup-time (bad solution), it might be already too late because launchd starts pre-handling the LaunchAgents folder maybe even before the LaunchDaemons-items get executed. Most customers are not familiar with the Terminal and typing some commands in order to fix this situation. Unfortunately, the 'Repair Disk Permissions' of the Disk Utility doesn't seem to change the permissions bit back to its original values of this folder. Thanks for any help, Peter
At 9:11 -0400 29/5/09, Peter Alshuth wrote:
Unfortunately, the 'Repair Disk Permissions' of the Disk Utility doesn't seem to change the permissions bit back to its original values of this folder.
Well this part is a bug IMO. Disk Utility should repair this. Please file a bug report. <http://developer.apple.com/bugreporter/> Beyond that, I don't have any great suggestions. You wrote: At 9:11 -0400 29/5/09, Peter Alshuth wrote:
Should my installer always check for the correct default permissions of /Library/LaunchAgents & /Library/LaunchDaemons and change it back in case they were altered [...]?
This is a really bad idea. If the default permissions change, your application becomes part of the problem not part of the solution. OTOH, detecting this damage, reporting it to the user, with a URL to click that leads to a support article on your site that describes the problem and the solution... that might be a good way to go. S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
participants (2)
-
Peter Alshuth
-
Quinn