How To Set Permissions.
Let's start by looking at what permissions actually are. Some PHP scripts need to modify other
files. For example, a script may need to store information in a text file. Permissions are a way of determining
who can modify certain files, and who can't. It's important to understand that you don't usually modify the
permissions of the PHP script itself. It's the files which the script needs to modify that need their permissions changed.
Permissions themselves are always a three digit number, such as 666, 600, 755. It doesn't matter what those numbers
mean, you just need to know that there's always three digits, each digit being no greater than 7. Sometimes
permissions are written as a four digit number, such as 0755, or 0666, with the first digit always being 0. You can
ignore the 0, it's meaningless.
Changing permissions is as simple as typing a number. It can be done with an FTP program or with a web-based
file manager or control panel.
You may not even need to change file permissions when you upload our scripts. Click here and
see the "Test Your PHP configuration" section for a simple test you can perform. If it works you can use our
scripts and ignore any advice to change permissions.
Using a control panel to change permissions
If your hosting provider has provided a control panel, such as Plesk or cPanel, or even a web-based file manager for
uploading files, then you may be able to use it to change the permissions of a file. You will have to read the
documentation provided by your hosting provider to learn more about this. In cPanel for example, you simply select
"File Manager" and then navigate to the file that needs its permissions changed. Select the file by clicking on it
once and then click on "Change Permissions", then enter the permission for this file (such as 755, 666 etc).
Using an FTP program to change permissions
There are many FTP programs to choose from, but not all of them allow you to change permissions. Below are instructions on using
three popular FTP programs, including download locations. I recommend FileZilla as it's free and easy to use.
How to change permissions with WS_FTP.
How to change permissions with CuteFTP.
How to change permissions with FileZilla.
|
|  |
| FREE Access! |
|
Join our mailing list and get FREE access to ALL the scripts on this site, plus tips, tricks and
regular updates.
Sign-up here!
|
|