Unix File Permissions

File Permissions control what other system users have access to your files. Be VERY careful before making permission changes as you may effect scripts installed on your site. Do a good check after making any updates.

File Permissions are broken into 3 sections:
User - For the owner of the file (usually you).
Group - For other users within the same group as the owner.
Other - For all other system users.

There are 3 types of permissions for each section :
Read - Controls the ability to read the file.
Write - Controls the ability to write to the file.
eXecute - Controls the ability to execute the file.

Common Permissions

File TypeUsersGroupOther
Directories (Folders)rwxrxrx
Web Pages (html, php)rwrr
Graphics (.gif,.jpg,.png)rwrr
CGI Scriptsrwx[NONE][NONE]
Data Filesrwx[NONE][NONE]

Notes

For example, you would add the following lines to your existing PHP script.

....
include ("/pub/users/your-site/www/phpMyAdmin/passwd.inc.php");
....
$DBpassword = $cfg['Servers'][1]['password'];