An expansion on Octal

I mentioned Octal as being base 8. It’s true. However in Linux circles you can either set permissions on a file or folder using user/group/other I always found it clunky. Instead you can just do a chmod 551

It breaks down as follows:

4 is read

2 is write

1 is excute

So chmod 551 says User can read and execute, group can read and execute, and other only gets to execute.

You just add up the values to get the permissions for each. All privs come up to chmod 777, that’s read, write and execute for EVERYONE.

But you can understand why it’s called Octal – only 8 possible values for each position.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s