The Index | What is Unix? | How to Use Your Account | Understanding the Basic Desktop. | Available Applications. | Working with the Command Line. | Tips and Tricks. | Help Me!


- Data Sheets -

- Using chmod -


chmod - modifies the permissions for any file that you own.

Ex. chmod 700 file1

changes the permissions on file1 to 700. That is the hard part of the command, in the display of permissions,

drwxrwxrwx

The owner's are first, then the groups, and lastly, the world's permissions for that file. Read means they can look at it, Write means they can modify it directly, and execute means that if it is an executable file, they can run it.

Now, each r is worth 4, each w is worth 2, and an x is worth 1...and they are grouped according to owner, group, and world.

So it looks like this:

 A    B   C
drwx rwx rwx
-421 421 421
A = the owner
B = the group
C = the world

For the chmod command, the first number is the owner's permissions, so if you want read and write for the owner, you would add the 4 and 2 together (of the r and the w) to get 6. Then, if you wanted the file to be completely private, you would give the group and world 0's. So the final command would look like this:

chmod 600 file1
If it is a Homepage, and you need the world to be able to read a file, you may want readable and writable by you, the owner, no group permissions, and readable by the world. This would result in:

chmod 604 file1
Which is a 4 and a 2 for the owner, and just a 4 for the world so they get read permission on the file. Practice with this a few times to see how it works.

The Index | What is Unix? | How to Use Your Account | Understanding the Basic Desktop. | Available Applications. | Working with the Command Line. | Tips and Tricks. | Help Me!

Contact: Jim Gramke with any suggestions.
Last Updated: Aug 8, 1996