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.


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

ini_set('display_errors', '1');
print("<hr> User is ");

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
  • Did you try restarting Apache? What files is it complaining about, exactly?
    – digitxp
    Aug 23 '10 at 21:02
  • Hi Digitxp - I added the update section. I have not restarted apache. I'll try that after dinner. Someone also asked something regarding PHP safe mode.
    – Richard
    Aug 23 '10 at 22:02
  • Apache restart had no effect sadly. I may try to chown -R to other user types. Combos apache:apache and nobody:nobody failed.
    – Richard
    Aug 24 '10 at 0:18
  • Checking on drupal.org/getting-started/6/install/…
    – Richard
    Aug 24 '10 at 0:21

There are couple of things to consider

  1. Turn selinux off or set it to permissive mode

  2. Check the selinux context of read/write permission directory

  3. Clear the cache of your browser and try again.

  4. restart apache and try again.

  5. Check if the directory has any disk quota and it exceeded the limit.


SELinux was a bit too high.

I temporarily set to permissive by using

sudo echo 0 >/selinux/enforce

After set up will reinstate to check.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.