2
I have a mac installer which runs as root with pre and post install bash scripts.
At the end of the post install script I launch the application which inherits and opens as root. Is there a way I can lower the permissions back down to the user that ran the installer and then open the app?
Or a more hackish way I can set the app to open in some scheduler from the script, which then gets opened by the scheduler which would have the users permissions
No need to ask a new question, just edit this one. I'll remove my comments so as not to confuse people. – Zoredache – 2012-09-24T16:58:54.323
Can you open the application using
open
, e.g.open -a /Applications/MyApp.app
? If you're not installing an.app
, you could check out output ofenv
, it probably contains the actual user name. Justsu -u $username /path/to/app
or something like that. – Daniel Beck – 2012-09-24T17:33:19.103I'm currently opening the app with
open "$APP_DIR"
. I guess asu -u "$username" "$APP_DIR"
? – GP89 – 2012-09-24T17:53:20.193