Re: Folder has limited permissions.
Re: Folder has limited permissions.
- Subject: Re: Folder has limited permissions.
- From: Andrew Farmer <email@hidden>
- Date: Fri, 25 Jul 2008 21:53:38 -0700
On 25 Jul 08, at 01:55, Macarov Anatoli wrote:
When user has a standard account (not administrator), he/she doesn't
have rights to create a file in the Directory /Applications/. I try
to create a file with the help of function authopen. This code
doesn't work:
FILE *pFile = popen("/usr/libexec/authopen -stdoutpipe
sys.openfile.readwritecreate./applications/tolea.txt", "w");
if(pFile == NULL){
NSLog(@"NOT Create");
}else{
NSLog(@"Create");
char *data = "Create";
pwrite(data, 1, size(data), pFile);
}
pclose(pFile);
How would be the correct way to do?
Besides what everyone else said, lose the -stdoutpipe and use -w or -a
(depending on your needs). -stdoutpipe uses SCM_RIGHTS, which is
rather subtle and tricky to use.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden