File permissions ==
With Linux, the most common way to handle user rights provides three distinct rights on files. The meaning of these rights for directories (which '''are''' files in Linux) is slightly different.
-rwx Octal Permissions 0000 0 None 0001 1 Execution only 0010 2 Read only 0100 4 Write only 0111 7 All (ie. Read and Write and Execution) 0110 6 All but Execution (ie. Read and Write)
; The group of the file (<code>g</code> as group): Typically the main group of the owner
; The others (<code>o</code> as others): Anybody else
As you would have notice, this does not provide a fine-grained way to manage permissions, but this is quite light, simple, and sufficient for most usages. However, if you think you need a really fine-grained level, you should consider looking at [[SELinux]].
Generally you will want to have restrictive yet functional permissions. 777 on everything is a bad idea, especially files containing plain text passwords. 600 is common for files like this, with a high level user. mediawiki's LocalSettings.php has database passwords. A good method to lock this down is to change its permissions to 600, and set the file owner as the webserver's user.