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

raziiq

macrumors member
Original poster
Aug 26, 2008
82
0
Is there anyway i can change the permissions of the iPhone system folders through code?
 
If you mean folders outside the sandbox, of course not. If you mean something inside the sandbox, you can but why would you want to?
 
If you mean folders outside the sandbox, of course not. If you mean something inside the sandbox, you can but why would you want to?

i mean folders outside the sandbox. I need to copy some files to it. May be to the /tmp folder.

But the main question is how to change the permissions, what should be the syntax?
 
i mean folders outside the sandbox. I need to copy some files to it. May be to the /tmp folder.

But the main question is how to change the permissions, what should be the syntax?
I think you would be able to for Jailbroken iPhones but no way for regular iPhone. Are you trying to implement the iPhone virus discussed in the other thread
 
I think you would be able to for Jailbroken iPhones but no way for regular iPhone. Are you trying to implement the iPhone virus discussed in the other thread

Come on man, its not about virus or something. Ya i m developing for Jailbroken iPhone
 
Well, it's the same code inside the sandbox or out.

Look at the docs for NSFileManager. You need to set the NSFilePosixPermissions.

Also

man 2 chmod
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.