Why does my script produce a 'file permissions error'?

CGI scripts need certain file permissions to be set if they are to work properly. In general CGI scripts need to have permissions on 755 (rwxr-xr-x), although PHP files only need 644 (rw-r--r--). The folders containing CGI scripts also need certain permissions. In particular, if a folder has very lax permissions, such as 777 (rwxrwxrwx), the web servers will not execute the scripts contained in it. Folders containing CGI scripts should ideally have permissions of 711 (rwx--x--x). This also applies to the folders that contain the first folder, if you have a multi-level folder structure, although 755 for folders is also fine.

  • 132 Users Found This Useful
Was this answer helpful?

Related Articles

My CGI/Perl scripts are failing with error 500 (Internal Server Error)

These errors are nearly always related to a coding error within the script, or bad variables...

CGI scripts fail with 'exec format error'

A CGI script must begin with a valid 'interpreter line' also called 'shebang'. That must be the...

Accesses to all files result in '500 Internal Server Error' messages

500 Internal Server Error messages on every page are typically an indication of a misconfigured...

Why do I get Zend Optimizer is not installed error message when running a script?

If you receive the error message below when trying to run a script on our servers please make...

Powered by WHMCompleteSolution