View Full Version : changing permissions through code
raziiq
Aug 6, 2009, 09:57 PM
Is there anyway i can change the permissions of the iPhone system folders through code?
PhoneyDeveloper
Aug 6, 2009, 10:03 PM
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?
raziiq
Aug 6, 2009, 11:15 PM
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?
jim93
Aug 6, 2009, 11:18 PM
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
raziiq
Aug 6, 2009, 11:21 PM
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
dejo
Aug 6, 2009, 11:41 PM
Ya i m developing for Jailbroken iPhone
Then you probably need to go find some forums dealing with jailbroken phones then. That's not really discussed here. Sorry.
PhoneyDeveloper
Aug 7, 2009, 12:44 AM
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
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.