Scripting

Writing CGI Scripts
Setting File Permissions
Writing PHP Scripts
CGI/Perl & PHP Resources
Basic Unix Techniques
Server Side Includes (SSI)
Scripts For Your Site

 SITE SEARCH:

OWH,

By the way, I have to make a comment. We moved to OneWorldHosting back in May from another vendor. I have never been sorry for that decision. OWH has simply been the most reliable and responsive host I've ever seen. Response to my technical questions has always been exceptionally good. Thanks for the follow up.

Keith
 



 
 

Scripting Setting 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 "700" or "755". 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.

NOTE: File permissions more "open" than 755 will not work - "755" should be the highest or most open setting used (and needed) for any script. "777" specifically will not work - will produce an Internal Server Error - use 755 instead.

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)

There should be three groups. Each group should have either checkboxes or a selection for the permission type.

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

2. set scripts to rwx for the owner, no permission for the group, and r-x for other

3. 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.

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

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.

1. set plain html pages to rw- for the owner, no permission for the group, and r--for other (default)

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

3. set data/config files to rw- for the owner, no permission for the group, and rw- for other

Select "Submit" to finish.

 

 

ORDER ONLINE | Hosting Plans | Resellers | E-Commerce
Technical Support | Why One World | Contact One World