CHMOD Calculator
When installing a script for your web page, you will most likely have to make some changes to the "permissions" for different files and folders. This means you are telling your website what someone visiting your site can do with various files in the script you are putting there. If a file is to be looked at only ("read only") this means that you do not allow anyone else to make any changes to it. This prevents people from hacking the file. Some files require other people to be able to make changes to them. For example, if you had a discussion board forum. The files that store all of the messages and user i.d.'s would need to be able to be changed as people post and join the forum. If these files were set to "read only" the discussion forum would try to add the new message to be posted, only to find out that the file is preventing any changes to be made to it. All of these settings should be spelled out in the documentation that came with the script. You will frequently see things such as "Change CHMOD for abc.cgi to 777". This is simply a matter of figuring out what the numbers mean. Here's a handy calculator to help you do your CHMOD setting changes. Go ahead and check off some of the boxes. This will change the numbers to come up with the right combination you are looking for:
After using it for a few moments, you will notice that it is simply a matter of basic math:
- The READ settings are worth 4 points
- The WRITE settings are worth 2 points
- The EXECUTE settings are worth 1 point
Once you realize this, it is easy to figure out the settings on your own. For example, setting a "7" means that READ (4) + WRITE (2) + EXECUTE (1) are all checked off. (4 + 2 + 1 = 7)
The best way to get a feel for it is to use the calculator for a few moments and pay attention to what happens when each box is checked. It really sounds more complicated than it really is. Once you understand the concept then you can easily do it in your head.
|