How do I set permissions on files and scripts?

Doing a CHMOD (changing a file's permissions) is the setting of access privileges for a file. This tutorial shows the process in one of the most common FTP applications called WS_FTP but the process is very similar with other ftp clients.

First connect to your hosting via FTP using the settings provided in your setup email.

Next click on the directory you have placed the cgi script in and right-click on the file you would like to set permissions for. The right-click menu is then displayed, and by clicking the "CHMOD" option we get to the main part of doing a CHMOD.

The new menu that appears has three columns - Owner, Group, and Other. Each column has three checkboxes below them - Read, Write, and Execute. eg for cgi scripts needing 755 permission - In the "Owner" column, check all three boxes. In the "Group" column check the first and third checkboxes. In the "Other" column, check the first and third boxes.

Finally, click "OK" to complete the CHMOD. Test your script or file again by calling it from your web browser. Everything should work correctly, but if you are still seeing an Error 500 Server Error then it is not because of your permissions.

  • 65 Users Found This Useful
Was this answer helpful?

Related Articles

What is the path to perl?

/usr/bin/perlYou can also find information on paths to other useful programs by logging in to...

I have created an include file that contains a username and password for a database. How do I prevent people from accessing that file directly?

Protecting PHP IncludesIn order to create a PHP file that is inaccessible from the WWW, please...

Does Fast-name support Image::Magick?

Yes we do, and in case you need to know the exact version number, at the time of writing, the...

What is the path to sendmail?

Should you need the absolute path to sendmail for use in a CGI script, it's in...

Can you set "register_globals" to ON in PHP for me?

Such a global change to the php.ini config is a well known security risk and affects all other...