Re: copying files with admin privileges
Re: copying files with admin privileges
- Subject: Re: copying files with admin privileges
- From: Mike Abdullah <email@hidden>
- Date: Fri, 24 Feb 2006 13:18:56 +0000
Is this really the approach that Apple suggest we take? Because it
seems to me that having to provide the dialog yourself is quite a bad
idea security-wise. Does Cocoa not have a function that will bring
up that dialog for you?
Mike.
On 24 Feb 2006, at 12:57, Keith J. Schultz wrote:
Hi Mike,
Just throw a dialog at the user asking for a admin Id and password,
Set up a NSTask for coping with Admin Id and password. No sure if
you need to use sudo as the task and the rest as paremeters.
Launch the Task and that is it !!
By the way you are not circumventing OSX's security, but are using
it !!!
Hope this helps
Keith.
Am 24.02.2006 um 11:44 schrieb Mike Abdullah:
Um, sorry for upsetting you?
You seem to have got the wrong impression about what I'm after!
I'm not looking to circumvent OS X's permissions scheme. I'm
trying to find out what is the proper approach for authenticating
from the user and carrying out the install.
Whilst I could use OS X's installer, I was trying to keep things
simple for the user. My program is just a normal app, and when it
starts up, it has a look to see if the user has installed the
script or not. If they haven't then it offers to install it for
them. However, I think I may just offer the ability to install
the script for the current user, since this requires no
authentication issues.
Mike.
On 23 Feb 2006, at 14:30, Robert Walker wrote:
However, when I try and make a copy to /Library/Scripts/
Applications/Mail I run into some problems.
If the user running the install is not an admin, then I cannot
create the required folders or copy things into them at all.
If the user is admin, but one of the existing folders is "owned"
by another admin user on the system, then I cannot create any of
the subfolders.
Well yeah, this darn well better be true.
What is the best way to do this? Or would I be better off not
allowing the user to install the script for everyone?
You'll have to do what every other similar "installer"
application has to do. Ask the user for their permission to
install the program. If the user is not an administrator then
there SHOULD BE NO POSSIBLE WAY for them to give this installer
the necessary permission.
I think the proper way to do this is to setup a Mac OS X
installer package and let the "built-in" installer program handle
the permission issues for you.
FYI: I don't believe this is the proper mailing list for these
types of questions. This issue is not directly related to the
Cocoa API.
On Feb 23, 2006, at 8:14 AM, Mike Abdullah wrote:
Hi, I need to copy some files with admin privileges.
Basically, in may app's resources folder, I have a simple script
that the application offers to install in the script menu. Now
to install this for the current user, it is very simple to copy
the file to ~/Library/Scripts/Applications/Mail using
NSFileManager's copyPath command.
However, when I try and make a copy to /Library/Scripts/
Applications/Mail I run into some problems.
If the user running the install is not an admin, then I cannot
create the required folders or copy things into them at all.
If the user is admin, but one of the existing folders is "owned"
by another admin user on the system, then I cannot create any of
the subfolders.
What is the best way to do this? Or would I be better off not
allowing the user to install the script for everyone?
Thanks,
Mike.
P.S. I have tried searching the archives, and am quite surprised
that I didn't find anything!
_______________________________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
trier.de
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden