copying files with admin privileges
copying files with admin privileges
- Subject: copying files with admin privileges
- From: Mike Abdullah <email@hidden>
- Date: Thu, 23 Feb 2006 13:14:17 +0000
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