Drupal install and permissions

Posted by Richard on Server Fault See other posts from Server Fault or by Richard
Published on 2010-08-23T20:30:07Z Indexed on 2011/01/03 23:55 UTC
Read the original article Hit count: 530

Filed under:

So I'm really stuck on this issue. An install process is complaining about write permission on settings.php and sites/default/files/. However, I've moved these files temporarily to write/read (chmod 777) and changed the owner/group to "apache" as shown below.

-bash-4.1$ ls -hal
total 28K
drwxrwxrwx. 3 richard richard 4.0K Aug 23 15:03 .
drwxr-xr-x. 4 richard richard 4.0K Aug 18 14:20 ..
-rwxrwxrwx. 1 apache  apache  9.3K Mar 23 16:34 default.settings.php
drwxrwxrwx. 2 apache  apache  4.0K Aug 23 15:03 files
-rwxrwxrwx. 1 apache  apache     0 Aug 23 15:03 settings.php

However, the install is still complaining about write permissions. I followed steps one and two of the INSTALL.txt but no luck.

Update:

To further explore the situation, I created sites/default/richard.php with the following code:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
mkdir('files');
print("<hr> User is ");
passthru("whoami");
passthru("pwd");
?>

Run from the command line (under user "richard"), no problem. The folder is created everything is a go. Run from the web, I get the following:

Warning: mkdir(): Permission denied in /var/www/html/sites/default/richard.php on line 9 User is apache /var/www/html/sites/default

Update 2:

Safe mode appears to be off...

-bash-4.1$ cat /etc/php.ini | grep safe | grep mode | grep -v \;
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
sql.safe_mode = Off

© Server Fault or respective owner

Related posts about drupal