OSX Permissions, going nuts here... help?


#1

I’m really going nuts with OSX and its file permissions, so if anyone could give me any sort of help I would appreciate it a lot. :slight_smile:

I created my own installer, and all I want to do is move files to a folder like /Library but I can’t, I need some sort of crazy APPLE crap to do that. On Windows I just compile with Administrator flags, but on OSX I can’t understand how to do things. AND YES, I have read all the documentation from Apple. Makes no sense to me. Keep in mind that I am mentally challenged, so maybe its simple but my mind can’t wrap around…

Just hoping someone would give me a hand. Nothing fancy, just move file A to B, while A is a public place like ~/Library to the protected B place which is protected like /Library is…

Cheers, WilliamK


#2

You’ll need to prompt the user for their admin password. Here is a project that wraps it up into a one liner: https://github.com/sveinbjornt/STPrivilegedTask

If you are just copying some files you should avid creating your own install and use Packages: http://s.sudre.free.fr/Software/Packages/about.html

Or, if you really want your own installer UI, then create installers with Packages and then install them silently from your UI.

installer -pkg /path/to/application.pkg -target /Applications


#3

Thanks, I will check this one out. :slight_smile:


#4

I still can’t figure out how I will manage things out. Darn you OSX!! For now I’m back to using DMG files. :wink: Maybe I will let this rest for a while and try again later. At least the Windows Installer works great.