CGI/Perl Script Permissions SEARCH
Changing File Permissions
This page explains how to set file permissions for the three most common type of web files: pages, scripts and data/config files. If you're new to scripting, or getting the dreaded "Internal Server Error" when you try to run a sample script you've downloaded, start here.

To keep things simple, let's make the following assumptions:

  • pages should be readable/writable by the owner and readable by the web visitor.
  • scripts should be readable/writable/executable by the owner and readable/executable by the web visitor.
  • data-config files should be readable/writable by the owner and readable/writable by the web visitor.
And also, lets use the following abbreviations:
  • --- (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 this first.

To change file permissions using your FTP software:

  1. Log into your account and go to the directory where the files are located.
  2. Highlight the file that you want to change permission.
  3. Locate the "file permission" or "chmod" command on your FTP software software (you may need to refer to the manual or help file)

  4. 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, no permission for the group, and r-x for other
    • set data/config files to rw- for the owner, no permission for the group, and rw- for other

To change file permissions using your Control Panel - File Manager:
  1. Log into your account Control Panel (mydomain.com/menu) and go to the File Manager, and then the "WWW" folder.
  2. Identify the file that you want to change permission.



  3. Select the "permission" link on the left side of the file you have identified. This will open a new window:



  4. There should be three groups. Each group should have checkboxes for the permission types. Don't worry about the "s" or "t" permissions - those are for rarely used settings.
    • set plain html pages to rw- for the owner, no permission for the group, and r--for other (default)
    • set scripts to rwx for the owner, r-x for the group, and r-x for other
    • set data/config files to rw- for the owner, no permission for the group, and rw- for other
  5. Select "Submit" to finish.