When configuring a web app, there are often files and directories on the server that the app needs to be able to read and write to. Image uploads, caches, etc. Anywhere that ExpressionEngine indicates that it needs write access needs the permissions below.
Unix-based systems are the most common to find hosting PHP/MySQL applications. When referring to file permission modes, we are using a 3-digit (octal) representation of Unix file permissions, which are separated into three scopes: owner, group, and others (world).
In the table below note how the symbolic notation–that you would see when using
ls -l on a Unix system–maps to the numeric representation.
-: doesn’t allow
r: allows read
w: allows write
x: allows execute, or on directories, allows access to contents
|3||Execute and write (1 + 2 = 3)||-wx|
|5||Read and execute (4 + 1 = 5)||r-x|
|6||Read and write (4 + 2 = 6)||rw-|
|7||Read, write, and execute (4 + 2 + 1 = 7)||rwx|
Note: Always use the least permissive settings that your web server allows. Contact your host for details.
Directories need to allow for access to their contents, so for each scope (owner, group, world), directory permissions will nearly always be one of the execute permissions: 1, 3, 5, or 7.
On servers that are configured with security in mind, only the owner needs write permissions, and group/world just need read.
Most secure: 755
Least secure: 777
In a web app like ExpressionEngine, no files themselves need execute privileges because the web server is controlling the process that actually executes the PHP. So the typical options will be 4 or 6.
Again, on servers that are configured with security in mind, only the owner needs write permissions, and group/world just need read.
Most secure: 644
Least secure: 666
IIS manages permissions using access control lists, and the needs can vary depending on the IIS version and how the administrator has configured the server for PHP applications. Commonly, the app folder should have Full control set for the IUSR user.
Please consult your system administrator to determine what the least privilege is necessary for the IIS user in order to have the ability to read, write, create, and delete folders and files.
Blank pages in ExpressionEngine, where the source is also empty, are usually the result of a suppressed PHP error.
Tip: If you have just installed ExpressionEngine and chose the “None- Empty Installation” Site Theme, your site’s homepage will appear blank because no templates or data have been created yet.
Follow these instructions until you are able to see the error message(s) being output by your server:
- Open your site’s main index.php file and under the Error Reporting section change:
$debug = 0;
$debug = 1;
- Go to
Settings --> Debugging & Outputand ensure that Debug Preference is set to 1: PHP/SQL error messages shown only to Super Admins.
- Go to
Developer --> Utilities --> PHP Infoand search the page for “display_errors”. Ensure it is set to On under the Local column. If it is not, your host can help change this setting for you.
- Check your server’s error logs or contact your host to assist you in cases where errors are being output to logs and not to the screen.
Form submissions that silently fail are typically caused by a URL mismatch. Check if your server is configured to re-write URLs by:
- Forcing the addition or removal of the “www” subdomain
- Forcing the addition or removal of trailing forward slashes in your URLs
Such URL re-writing rules are often found in a .htaccess file located in the web root of your site. Temporarily disable this file (if it exists) by renaming it to anything else and testing again. Your host can also help you determine if any such rules are in effect or possibly configured elsewhere.