Home arrow Site Administration arrow Page 4 - CHMOD: Tool for Open Source Administration

Modes - Administration

CHMOD (chmod) is a UNIX oriented command that means “Changing Mode.” It lets you change the mode (hence the name) of the file, or directory(ies) depending on how the chmod command is used. When I say “changing mode,” I mean giving the file a different permission scheme, respectively read, write, and execute. This command, by the way, is one of the most useful and most used commands in Linux.

  1. CHMOD: Tool for Open Source Administration
  2. chmod Reasoning
  3. Switches
  4. Modes
  5. Mentally Converting from “read/write/execute” to 777
By: Drew Decker
Rating: starstarstarstarstar / 31
December 05, 2005

print this article



Basically modes are a simple way of saying permissions. There are a few exceptions to this rule, but they aren't part of this article. There are three basic modes: -r (read), -w (write), -e (execute). See the chmod figure.

CHMOD Figure

Later in this article, I’ll explain how you can find out the number system for certain modes (permissions). Modes to a basic extent is very easy and simple. You have three numbers: the first number is for the owner, the second for the group, and the third for the world. Depending upon the numbers, you will get a certain permission assigned to the respective object. We will use the examples from above:


  • chmod -v 755 /Test

This states that the owner is assigned Read, Write, and Execute permissions; groups that are assigned to the file/directory get Read and Execute permissions; world (other) also gets Read and Execute permissions.

Take a break. Drink some coffee or tea. If you're avoiding caffeine, do 100 jumping jacks. Then come back for the fun part: binary/octet conversion.

The Structure of chmod octet

You see octets all the time. If you recall, an IP address is a series of four (4) octets. Simply put, an octet is eight bits of data. So in an IP address you have your localhost ( You have four octets: 127, 0, 0, and 1. We now have to go back to remembering binary. Even though it might be a one (1) it is still set in binary as 0001, which is 1 bit of data. With an IP address, however, it is viewed as eight bits in binary, so it would look like 00000001, thus the eight bits - octet (Figure 1).

Figure 1

So what’s this have to do with chmod? Well, in order to make permissions with chmod using the numerical format, you have to know how to convert the permission (binary) to octet. Read = 4, Write = 2, Execute = 1. Do you see the pattern? If you don’t, look at Figure 1; it goes: 1, 2, 4, 8, 16, and so on. We only need the first three bits of binary: 1, 2, and 4. This is a simple structure of the chmod’s octet.

>>> More Site Administration Articles          >>> More By Drew Decker

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates


Dev Shed Tutorial Topics: