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:
- 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 software (you may need to refer to the manual or help file)
|