Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

raziiq

macrumors member
Original poster
Hi there.
I am developing for Jailbroken iPhone. I need to write(copy) a file to iPhone System Folders (/Library/LaunchDaemons) to which only ROOT has write access. How can i write a file to such folders through my Code. I know i can use NSFileManager's copyItemAtPath:toPath method to copy the file, but i cant write as i dont have permission to write on such folders.

Any Suggestions??
 
I haven't developed for JB iPhones but the way to do this is probably how its done on MacOS X. Look up suid and MacOS X or cocoa. There is a security framework on the Mac that gives an app the ability to access root-owned resources. Don't remember what it's called but there are lots of examples of how to use it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.