Re: copying files with admin privileges
Re: copying files with admin privileges
- Subject: Re: copying files with admin privileges
- From: Robert Walker <email@hidden>
- Date: Thu, 23 Feb 2006 09:30:05 -0500
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:
This email sent to email@hidden