xSellize: [Guide] chmod permissions/ and some chown tips! - xSellize

Jump to content




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Guide] chmod permissions/ and some chown tips!

#1
User is offline   gashi 

  • Donator
  • PipPipPipPipPip
  • Group: +Contributor
  • Posts: 52
  • Joined: 05-July 08
This guide is for that one time that you installed an app just before that boring event and you were rushed off. and you forgot to change the permissions .
Or for the fellow whos app is on the fritz and wonders if its a permissions issue or a ownership issue(not likely the case)

first ill cover the least likely thing you'll ever need to use on the iPhone: chown
chown is used to change the owner of a file, this may come in handy later on down the road as we may see more actual custom firmware that may be more like a Operating system that has users which is unlikely but just in case ill give you the command structure for chown

chown [-R] [[user]][:group] target1 [[target2 ..]]


ill go over this step by step
the parts of the command in the brackets([]) are optional but theres like a order of operations with them to so brush up on the old "PEMDAS"(Order of operations) from math.

now "-R": this is an option to recurse through a directory so everything within that folder will be changed every single little thing

user is of course the user name such as root

user groups are like on windows you have Administrators and then Regular users and when you get into Active Directory on Windows servers you can create other groups that will have different types of permissions

target(s) are the files or directories that you are going to apply the change(s) to

Simple huh?

CHMOD
--------------------------------------------------

chmod time:

chmod [options] mode file1 ...


now this command may look simple but if you don't know what your doing your going to prolly end up screwed to high heaven lol

before i go into detail further
Read: 4
Write: 2
Execute: 1


This is the values that r,w, and x are worth
and there are three rows of permissions

Owner
Group
Public


those are the order of the three numbers int he permissions
so if I were to say change the permissions to (0)700
that means the owner always will have read write and execute and no one else has permission to even look at that file

so in the modes part of the chmod it will look like this
rwx-----


but the permissions that were all acustomed to looking at (0)775 looks like this
rwxrwxr-x


see the pattern here?

if i were to give a owner just execute permissions(which is stupid to do by the way) and noone else have anything
100
but if i were to say use just read and write it would be
600
thats because you add the values of the r,w, and x and what you come up to in what you want the user to have will come to 0,1,2,3,4,5, or 6
depending on the permissions for the row you want it to have

so let say i want to change the permissions of MyApp.app to have the owner have rwx group to have r-x and public to just be r-- then we will have (0)754
and now to put the command to use I'll give an example
chmod rwxr-wr-- /Applications/MyApp.app


This command will really work on your iPhone by the way if you had a MyApp.app in the Applications folder

i hope this explains everything if you have and if you happen behold any equivocality in my post please apprise, and I shall recondition the document above

Translation for those of less inferior intellect: if you see anything you don't understand tell me and ill make it so you can understand

i am conceited in the matter of my brobdingnagian dialect

Edit: comments on vocab
and i'm not being arrogent or nothing the vocab stuff is just for fun and so that people will pick up a dictionary and thesauras as I know that some of the youth is not even being taught "big" words so its a way for me to expand mine and others
0


#Ads
User is online x-bot

  • Ad-Bot
  • Group:x-bot




#2
User is offline   novusordo927 

  • Whats an iPhone
  • PipPip
  • Group: Members
  • Posts: 24
  • Joined: 20-July 08
I have a question for you buddy, not on anything particular though. Bare in mind that the only thing I know about this topic I learned over the past couple of days.

I was just wondering if you knew if there was a protocol to follow when setting permissions to say (0)775 or (0)777. Looking at some programs installed though cydia, most of them have just a select few that have the permissions set to (0)775. I know that when customize first came out for 2.0, I manually installed it and the only way I got it to work was to set all the files to (0)755 and leave the directories (folders?) alone. Granted it didn't work quite well, but even now that I have uninstalled it and reinstalled it through cydia it is still a little shoddy along with most apps on 2.0...

I also was never able to get the .app method to work for me; assuming it was because of these permissions not being set right. If it's too complicated to explain then don't waste your time. Like I said before, I don't really know anything about this stuff and I don't really have time to learn about it in that much detail.

Thanks, cheers, regards...
0

#3
User is offline   gashi 

  • Donator
  • PipPipPipPipPip
  • Group: +Contributor
  • Posts: 52
  • Joined: 05-July 08
okay, here's your answer to the first paragraph
for Customize you would execute this command to set everything from the folder Customize.app down
chmod -R -v rwxrwxr-x /Applications/Customize.app

this will set permissions to 775 which is the standard permissions from all iPhone apps installed by us
and most other apps on the iPhone minus one or two
but you can also wihtout no harm set it to 777 permissions which is rwxrwxrwx instead of rwxrwxr-x

the first number in the three digit number is for the owners permissions the second is for Group permissions and the third if for public

and the same is for the rwx in the modes the first set of three characters of for owner next three is group and last three is for public

when you dont allow any type of permission with chmod you must put a - there at least that what i do to avoid any confusion as some shortcuts with the modes are tricky

but this is just something to play around with the easyest way is to get something like FileZilla or cyberduck if on a mac

this allows you to do things graphicly this method of doing this is when your away from a actual computer

but can also come in handy on a linux server that has no GUI =D


and the last thing about the vocab thing I was joking with everyone i used a thesaurus LOL i do that sometimes to expand my vocab ill edit the post and state this

i hope I cleard things up for you and others that might be wondering the same thing. and I hope that you will continue to do things the old fashioned way as i'm used to doing when i dont feel like connecting my iphone to a computer just to change one thing

and also PM me and if people want ill start teaching shell(also Bourne, and BASH (Bourne Again SHell)) which is the linux terminal and also of MacOS X
0

#4
User is offline   novusordo927 

  • Whats an iPhone
  • PipPip
  • Group: Members
  • Posts: 24
  • Joined: 20-July 08
Sorry. I edited out what I said. Although, I'm still not sure if it was just fatigue that made the last thing you said sound arrogant or maybe the way you said it with the arcane sentence followed by "...inferior intellect..." and then by "i am conceited..."

Oh well, thanks for the reply anyways.
0

#5
User is offline   gashi 

  • Donator
  • PipPipPipPipPip
  • Group: +Contributor
  • Posts: 52
  • Joined: 05-July 08
lol no problem if you need anything else from me let me know
0

#6
User is offline   shashank8804 

  • Whats an iPhone
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 06-August 08
I know all about chmod ( at least i think so) but i have a problem with this.

I am creating pwnage bundles containing all the cracked appstore apps so i could create custom firmware with the apps.

The problem is this code in the info.plist file

Commands


Action
SetPermission
File
Applications/Monkey Ball.app
Permission
4755



As in the code, the Monkey Ball.app actually does get chmod to (4)755
but all the files in it are not chmodded.
Hence the app crashes as soon as it is launched.
I did 755 to all the files in Monkey Ball.app/ through cyberduck. The app then works!!
But how to do this in the plist files.
I also tried u+srwx, but it dosent work.

Can you include this code in plist files :
chmod rwxr-wr-- /Applications/MyApp.app

OR chmod -r 755 /Applications/MyApp.app

or something like that.

Please help how to do this by the editing the plist file.
0

#7
User is offline   james1 

  • Whats an iPhone
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 10-August 08
Thanks for the guide!
0

#8
User is offline   Kiros76 

  • Whats an iPhone
  • PipPip
  • Group: Members
  • Posts: 10
  • Joined: 06-July 08
excellent post!
0

#9
User is offline   gangstarr 

  • Whats an iPhone
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 27-January 09
how do i change ownership of a file to mobile?
0

#10
User is offline   Carrbone 

  • Your rules, Your Opinion, Not mine.
  • PipPipPipPipPipPipPipPipPipPip
  • Group: +Contributor
  • Posts: 1209
  • Joined: 10-June 08

gangstarr said:

how do i change ownership of a file to mobile?

To change ownership of file, download PuTTY > Navigate to the above directory can then type chown mobile then the filename
You can also just right click it in apps like winscp and youll see the option
Posted Image

Posted Image

Posted Image

Posted Image

Push the Thanks Button, Dont post it. It just litters the forum for us

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


Close  Member Login