473,471 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ


What is CHMOD?

By Blair Ireland
Senior Editor, TheScripts.com

What is Chmod?

If your web host is running off of some flavor of unix (linux is the most popular nowadays), and you would like to run CGI scripts, you must realize a few things before hand.

First of all, unix systems are very different then the usual Windows systems you are currently quite comfortable with and used to. Similar to the use of profiles in windows, unix has users. Each user has certain permissions to access files and such.

The superuser, AKA root, has the power to do anything on a server. Basically they are the god of that computer. All of the smaller users do not have these capabilities though. Your HTTP server often run as nobody, an account with few or no privileges. That means the person accessing your site via the web, they have quite a bit fewer permissions or capabilities then you do (the account holder).

Therefore, if you want to make a file accessible via the web, you must give that file 'permission' to do so. The typical CGI script is set to be world executable, or chmod 755 (-rwxr-xr-x)

Chmod means basically change mode. This changes the file access privileges on the specified file.

So how do I set this up?

Easy. The easiest way I would recommend is using your FTP program, as Telnet is probably a little too advanced for you right now.

The program I am currently using is FTPVoyager (http://www.ftpvoyager.com/), which I highly recommend for all.

Now, this is a pretty simple procedure. Browse your way through your web directory to your cgi-bin, or wherever the script is that you want to be able to run. Select it and right click. From the window, go to properties.

You will be confronted with a little pop-up box, which states a bunch of information about this file. At the bottom you will see 9 different check boxes, some checked, some not. Each check box represents a different permission level. Since all CGI scripts are generally 755 (world executable), then you will want to click the following boxes;

User - Read, Write, Execute
Group - Read, Execute
World - Read, Execute

If you see a little input box though, you can just type in 755 there and click ok. There you go, your script can now be accessed via a web browser.

 

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.