HostMonster Web Hosting Help

Changing File Permissions


Setting file permissions is very important in getting CGI scripts to work on your web site. The following will explain the correct settings.

Explanation of Permissions

  • Pages (HTML Files) should be readable/writeable by the owner and readable by the web visitor.
  • Scripts should be readable/writeable/executable by the owner and readable/executable by the web visitor.

The following are abbreviations for permissions:

  • --- (or 0) = no permission
  • r-- (or 4) = read-only permission
  • rw- (or 6) = read/write permission
  • r-x (or 5) = read/execute permission
  • rwx (or 7) = read/write/execute permission

Sometimes you'll see these numbers referenced for a script. For instance, "chmod your script to "755" or "777". That means "set file permissions to "Read-Write-Execute/Read-Execute/Read-Execute".
"755" is in fact the most common setting for CGI/Perl scripts - if your script does not work or you get an "Internal Server Error" when you run it try fixing the permissions first.

Changing Permissions Using An FTP Application

Log into your account and go to the directory where the files are located. Highlight the file that you want to change permission. Locate the "file permission" or "chmod" command on your FTP software (if you are using Filezilla, highlight the file, right click and choose "File Permissions"). There should be three groups. Each group should have either checkboxes or a selection for the permission type.

Set pages to rw- for the owner, no permission for the group, and r--for other.

Set scripts to rwx for the owner, r-x group, and r-x for other.

Knowledgebase Article 156,894 views bookmark tags: cgi permissions (updated 747 days ago)

Was this resource helpful?

Did this resolve your issue?

Please add any other comments or suggestions about this content:

Recommended Help Content

Short tutorial on how to set file and user Permissions in cPanel. (updated 949 days ago)
Knowledgebase Article 141,930 views tags: file permission permissions rights

How do I change my contract length? (updated 950 days ago)
Knowledgebase Article 80,204 views tags: change contract hosting length package payment

Why am I Getting File Not Found When Executing My CGI? (updated 1339 days ago)
Knowledgebase Article 130,365 views tags: cgi

Related Help Content

Can I add my own CGI scripts? (updated 958 days ago)
Knowledgebase Article 158,895 views tags: cgi scripts

Can I change my username after registration? (updated 1956 days ago)
Knowledgebase Article 75,900 views tags: change username

I need help with my CGI script? (updated 1978 days ago)
Knowledgebase Article 111,189 views tags: cgi scripting

Understanding the Basics of CGI. (updated 954 days ago)
Knowledgebase Article 196,691 views tags: cgi

Does your company have any limit about CGI script use? (updated 954 days ago)
Knowledgebase Article 124,672 views tags: cgi script

What is CGI? (updated 953 days ago)
Knowledgebase Article 106,081 views tags: cgi

The Legacy File Manager will allow you to manage almost everything about your files, you can use it to upload, download, edit the code, change permissions and more! (updated 1490 days ago)
Video "How-to" Tutorial 88,835 views tags: cpanelutilities files upload

Where do I Change my Mailbox (Size) Quota? How do I Increase or Decrease Mailbox (Storage) Quota? (updated 525 days ago)
Knowledgebase Article 190,735 views tags: account change decrease email increase mailbox quota size