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.The UNIX security model allows you to set different levels of access to a file for different groups of people. This allows you to let the web server modify a file via a CGI script, for instance, while preventing other users from having normal access to the file. There are three groups in terms of file access, and three different permission types they can receive.
The groups are:
The potential permissions are:
To keep things simple, let's make the following assumptions:
2. Log into your account and go to the directory where the files are located.
3. Highlight the file or directory that you want to change permission.
4. 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/cpanel) and go to the File Manager, and then the "WWW" or "public_html" folder.
2. Identify the file that you want to change permission by clicking on the file/directory link.
After selecting the link the right menu will update itself and show you a list of things you can do to the file/directory. At this point select "Change Permissions. A box like below will load:
There should be three groups. Each group should have checkboxes for the
1. set plain html pages to rw- for the user, no permission for the group, and r--for world (default)
2. set scripts to rwx for the user, r-x for the group, and r-x for world
3. set data/config files to rw- for the user, no permission for the group, and rw- for world
Select "Change" to finish.