SmartVPS - the complete multi-account hosting solution! Each individual account comes with free backups, addon domains, PHP-FPM with OPcache and server-side caching for lightning-fast sites. And all this at a great price!

Setting permissions

Here you can find how to set file permissions for some of the most common web files and folders: pages, Perl and PHP scripts and data/config files, images and folders. Sometimes, incorrectly configured permissions may be a reason for "Forbidden" and "Internal Server Error" messages

In general you need to have the following permissions for the files and folders on your site:

  • PHP scripts, pages and images should be readable/writable by the owner and readable by the web visitor - this means that all HTML pages you have can be with permissions of 644 or higher -- 664, 755, etc
  • Perl scripts should be readable/writable/executable by the owner and readable/executable by the web visitor -- 755
  • data-config files can be readable/writable only by the owner -- 400, 600
  • folder on your site must be readable/writable/executable by the owner and readable/executable by the web visitor -- 755

Below is a brief explanation of what these numbers mean.

  • --- (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

So for example 664(rw-rw-r) represent the following permissions - read/write for the owner, read/write for the group, read for the public.

Most scripts or installation instructions require that you CHMOD your script to 755. This means that you need to set its file permissions.

NOTE: File permissions higher than 775 are not necessary - both 755 and 775 will work.

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 permissions for.

3. Locate the "file permission" or "chmod" command on your FTP software software (you may need to refer to the manual or help file) and apply the needed permissions.There should be three groups. Each group should have either checkboxes or a selection for the permission type.


Usually there is a textbox where you can type in the desired permissions - 775 for example and 3 sets of checkboxes.
The first set of check boxes applies permissions for the "Owner", the second for the Group and the third for the Public.

You need to type or select the desired permissions and click OK. Your FTP program will update the file permissions on the server.

To change file permissions using your Control Panel - File Manager, pleasefollow this link.