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: Fri, 24 Feb 2006 09:05:47 -0500
Oh, sorry, I didn't mean to sound upset. I really wasn't.
I just wanted to make sure it was clear that if the security measures
could be circumvented by application code it would be a major
security hole that malicious code could easily exploit.
I may have also gotten the wrong impression of what you were asking.
I apologize if that's the case. It just sounded like you were trying
to bypass the OS security measures.
On Feb 24, 2006, at 5:44 AM, Mike Abdullah wrote:
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:
This email sent to email@hidden