Jump to content

online chmod calculator http://www.madpenguin.org/tools


Guest GorGor
 Share

Recommended Posts

In your head chmod calculations

 

Its not actually difficult to just work em out in your head once you understand how it works. Its always better to understand so heres the explaination :-)

 

Simple files all have three sets of permissions ®read,(w)rite,e(x)ecute.

These permissions can be set seperately for three sets of users

owner,group,world

 

Aside:

On a real system users are classified in groups, something the Mandrake user program seems to have screwed (IMHO).

I add all my users to the default group of (100) users unless they are a special user.

endAside:

 

So this gives rwx,rwx,rwx for every file.

Its represented by a decimal number which is a binary number, we'll take a single set first of rwx.

rwx

421

Add those numbers together and you get 7 (4+2+1) hence 7 represents all permissions (rwx)

So if you want say r-x (no write permission you add r=4 and x=1 =5)

If you want execute only its 1. Check it out all the numbers are unique ..

 

With practice this is second nature and it gives a better control over your files.

 

So each number in a CHMOD or UMASK represent one of the user,group,world settings.

7,3,4 means user rwx =4+2+1, group -wx 2+1 and world r--

A somewhat bizare combination chosen to illustrate a point. Permissions are cumulative so user mickey in the same group as the file owner can write and execute but he's also part of world which is r--. So to him this permission is rwx.

 

Hope that was explained simply .... it really is even if Im cr%% at explaining it.

Link to comment
Share on other sites

Thanks for explaining that Gowator, I was thinking the same thing, better to do a

man chmod

and find out what it means than to go to some website and follow some instructions without knowing what it stands for.

 

btw a much easier way is revealed in

man chmod

namely

chmod a+x [file]

to make a file executable for all, or

chmod o-x [file]

to make it not executable for other

 

So you can do:

+ or -

to give or take away the permissions, which are:

r (read)

w (write)

x (execute)

and you can give to or take from

u (user)

g (group)

o (other)

 

see also:

man chgrp

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...