running the installer script, I am getting this message right off the bat

"The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process."

YET, when I check the permissions in sites/default/settings.php, they are set to read/write...

I had a drupal4.7 install on this localhost before, and it broke somehow, so I deleted all of those files and replaced them with the 5.0beta. maybe this has something to do with it?


cog.rusty’s picture

They are set to read/write for whom?

For example, on a *nix system, 644 permissions are read/write only for you.
But Drupal writes through the web server's account, not through your own user account. Is it read/write for everyone? (666 on a *nix system).

bridewell’s picture

Ya the dude is right, better check who the user is the file and directories. Set it to whatever user runs your webserver, mine is "apache". I think when you are logged in as another user, like root, then when you download the drupal files to install, it makes whatever user is doing the download the user of the files and directories. So, I just changed mine to the "apache" user and all worked fine. You don't have to modify the settings.php manually as some people have suggested.
cheers and good luck!

Francis Pilon’s picture

How about:

chmod to 777
Run the installer
chmod to 755

saneax’s picture

here is my sites/default permission..

[saneax@tuzx htdocs]$ ls -l sites/default
-rwxrwxrwx 1 saneax dakiya 6023 Jan 13 18:05 settings.php

[saneax@tuzx htdocs]$ ls -l sites/
drwxrwxrwx 2 saneax dakiya 4096 Jan 15 04:20 all
drwxrwxrwx 2 saneax dakiya 4096 Jan 24 02:44 default

[saneax@tuzx htdocs]$ ls -l ./
-rwxrwxrwx 1 saneax dakiya 27410 Jan 15 04:11 CHANGELOG.txt
-rwxrwxrwx 1 saneax dakiya 262 Aug 9 00:42 cron.php
drwxrwxrwx 2 saneax dakiya 4096 Jan 15 04:20 includes
-rwxrwxrwx 1 saneax dakiya 872 Dec 12 01:32 index.php
-rwxrwxrwx 1 saneax dakiya 1431 Sep 8 09:29 INSTALL.mysql.txt
-rwxrwxrwx 1 saneax dakiya 1073 Sep 8 09:29 INSTALL.pgsql.txt
-rwxrwxrwx 1 saneax dakiya 22032 Jan 10 02:15 install.php
-rwxrwxrwx 1 saneax dakiya 9260 Jan 8 03:59 INSTALL.txt
-rwxrwxrwx 1 saneax dakiya 18064 Jul 9 2006 LICENSE.txt
-rwxrwxrwx 1 saneax dakiya 1778 Dec 11 09:09 MAINTAINERS.txt
drwxrwxrwx 3 saneax dakiya 4096 Jan 15 04:20 misc
drwxrwxrwx 31 saneax dakiya 4096 Jan 15 04:20 modules
-rw-r--r-- 1 saneax dakiya 20 Jan 24 02:37 phpinfo.php <-----
drwxrwxrwx 3 saneax dakiya 4096 Jan 15 04:20 profiles
-rwxrwxrwx 1 saneax dakiya 1654 Jan 8 04:02 robots.txt
drwxrwxrwx 2 saneax dakiya 4096 Jan 15 04:20 scripts
drwxrwxrwx 4 saneax dakiya 4096 Jan 15 04:20 sites
drwxrwxrwx 7 saneax dakiya 4096 Jan 15 04:20 themes
-rwxrwxrwx 1 saneax dakiya 30446 Dec 25 13:22 update.php
-rwxrwxrwx 1 saneax dakiya 2941 Jan 9 01:16 UPGRADE.txt
-rwxrwxrwx 1 saneax dakiya 352 Dec 10 2005 xmlrpc.php

.. Now obviously when nothing was working I gave 'chmod -R 777 *' on my web folder..
I can view phpinfo.php.. and I have read the general requirements
and everything seems good. except.. when I run.. I get
"The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process."

earnestly requesting some light..? (besides I am trying to set up drupal on sourceforge)

"one who lends shoulder, needs the most" -- 'Uknown'

mkzelda’s picture

I'm getting the same error, even after trying chmod 777 settings.php.

Tigerboy’s picture

change all files and folders to the web sites main user name and group(should be the same name as you log on to cpanel if you log on to cpanel to make changes to an individual web site) and then lock all files and folders that don't need to be written to. In drupal all you need to write to is /sites/default/files and files and folders below; all other files and folders should be chmod 0755 folder or name here .

You can do an entire folder with all it's sub folders by typing chmod -Rf 0755 foldername .. and to change the owner and group name chown -Rf logonname:logonname foldername .. both of those change the foldername and all the files and folders below it. (or technically above it) But whatever you do don't make anything 777 other than files and folders nested in files as I said above.

Drupal installer requires write permissions to settings.php ONLY WHEN INSTALLING after that you need the minimum possible settings on settings.php. I recommend making it owned by web sites main user and setting the permissions to 0444 or less. If you run in the most secure model you can set settings.php to 0400 but 0440 should work just try variations. Remember if you are working in SSH as root user than all the folders you create will be root:root so be sure to change them as stated above to the web site's main user unless your php is running as root user which is extremely dangerous mostly it runs as Apache which just means you have to make the files folder and offshoots publicly writable but leave them owned by the web site main user(see chown above). settings.php only needs to be writable during install try different secure permissions but you should be fine with 0777 just during install time immediately chmod to 0444 or 0440 or less (try each one) after you finish the install of drupal successfully. Then only edit settings.php using pico or nano editors in ssh which will not require you to fool with the permissions of settings.php.

By leaving the settings 0777 you are EXTREMELY hackable and your webserver can be used as a place to put fake banking pages etc as well as your email used to send out spam. Linux/unix are by far the most powerful and secure operating systems-- just use it properly and you'll be fine.

lastrock’s picture

I had the same problem.

Resolved it by adding my database name, username and password to settings.php manually.
Then had no probs.

lastrock’s picture

It might pay to check the permissions afterwards.
I found the installer did not revoke write permissions afterwards as I thought it was suppossed to?

EDIT: oops, yes it had, I got a bit confused. 'scuse me.

benc’s picture

In addition, mine worked after changing "localhosts" in $db_url of settings.php to ""

I use MacOSX and XAMPP

"Drupal and the Power of Categories (Taxonomy)"

nawill81’s picture

This also worked for me.


dianaltg’s picture

I tried setting permission to 777. Also, tried setting database name, username, and password manually. Also, tried specifying localhost manually.

Got error message:

"Requirements problem
The following errors must be resolved before you can continue the installation process:
The Drupal installer requires write permissions to ./sites/default during the installation process. If you are unsure how to grant file permissions, please consult the on-line handbook.
The directory sites/default/files does not exist. An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the on-line handbook.
Please check the error messages and try again."

Any ideas?

Avitohol’s picture

So did you create manually sites/default/files? If not - do it and give it write permissions.

dianaltg’s picture

That's it. Thanks!

wesinbrooklyn’s picture

I am just pulling my hair out with this problem:

"The Drupal installer requires that you create a settings file as part of the installation process.

1. Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php.
2. Change file permissions so that it is writable by the web server. If you are unsure how to grant file permissions, please consult the on-line handbook.

More details about installing Drupal are available in INSTALL.txt."

I am trying to install Drupal locally on Xampp on Vista Home. I am an industrial designer and have better than average understanding of making stuff work on my computer, following directions, but I have tried everything that I have read here and everywhere to get drupal working, and can not get past this error message. I have spent literally hours on this.

-I have copied, not written over default.settings.php
-I have set permissions on the files via properties/security
-I have run notepad as admin, and built a new "sites" directory, with new settings files properly named, with content pasted from originals, and all permissions given.

I can't even name all the other ways I have tried to fix this. I have started from scratch like 7 times. I've kind of given up, maybe I'll give drupal another attempt in a month or two, I just don't understand why it is this hard to set it up locally. I hope in the future it is easier, it has been super frustrating.

Vako’s picture

I just finished upgrading from Drupal 6.6 to 6.9 and I had a major problem updating the settings.php file, I had set the permissions to 777, yet I was unable to edit the file. Finally I had to use the cPanel's File Manager to change the permissions, edit the file and change the permissions back. It worked for me.
If you try to overwrite the file, use the cPanel's File Manager and nothing else for this file mainly. Any other file is ok to use FTP clients.

wesinbrooklyn’s picture

Thanks for your solution. That too worked for me on my install on my server- it took a few minutes to figure it out, but I got it.

But on a local install on Vista Home & Xampp? I've had no luck!

Thanks though, i hope your post helps someone else.

hbarnard’s picture

Thanks, I had a lot of php messages about settings.php and default.settings.php (which I reintroduced, I'd removed it) so I changed both to 777, ran the installer and changed both back to 555. I've removed the default.settings.php now, don't know whether it was used but the installer complained about it.

andyscotuk’s picture

thanks. Spent ages trying to change settings and muck about with file permisssions. The cpanel solution worked.

rbiffl’s picture

I had a similar problem when trying to edit my sites/default/settings.php file. The problem was that its folder, sites/default, had its permissions set at 555. I changed sites/default to 755, edited settings.php, and changed sites/default back to 555.

janilink01’s picture

I had the same problem I'm good now thanks :-)

Cleaning Supplies’s picture

Yeah me too. Many thank for sharing this.

Sitegurus’s picture

Oh man... I can't believe I just spend an hour on this. Even opened up a SSH session to see if it was something with the rights not changing through ftp and remove it from there so I could upload the changed file. It was just the &*%^& folder permission... Thanks for this comment! Probably saved me another hour.

tedavis’s picture


I am currently trying to install drupal on a University server which is, as you can imagine, shared between all the different departments.

I have changed the permissions of the sites/default folder to 777 and the settings.php too etc.

The site is at:

I am still getting the write permissions errors for both the files folder & settings.php

Any help?

cog.rusty’s picture

Verify that your permissions changes of the settings.php file and its containing directory have been actually applied. Drupal protects them again automatically every time you visit the admin section. Verify that they are still unprotected.

About the files directory:
- Verify the permissions of the files directory (and the temp directory) specified in Drupal's admin/settings/file-system page as well as its subdirectories (files/images, files/pictures etc), and check who their owner is.
- Run a phpinfo() and see if any "open_basedir restriction" or "safe mode" are enabled on the server.

tedavis’s picture

I ran phpinfo and the open_basedir is set to "no value" and safe mode is off.

I asked the university team and they informed me that the permission changes had been made.

Could it be a problem related to the fact its not being installed in the root directory? The university hosting does host a lot of other sites for the uni and the hosting for the site is in a subdirectory.

tedavis’s picture

Turns out there was a problem with the univeristy server write issues - all sorted now!

rcaceres’s picture

For the Linux users, I run into this problem many times when installing drupal in Fedora 12 or 13 lately.
if you are setting the write permissions as I assume you are, the problem could be the Security application SELINUX is enabled by default. Check if you have it:

[rcaceres@LimaFed ~]$ more /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.

If the next command returns "1", that means it is enabled:

[rcaceres@LimaFed ~]$ cat /selinux/enforce
1[rcaceres@LimaFed ~]$

You can temporarily disable it to allow your drupalinstallation, once done you may re-enable it:

[rcaceres@LimaFed ~]$ su
[root@LimaFed rcaceres]# cat /selinux/enforce
1[root@LimaFed rcaceres]# echo 0 >/selinux/enforce
[root@LimaFed rcaceres]# cat /selinux/enforce
0[root@LimaFed rcaceres]#

Hope it helps

admiral21’s picture

Use the 'Legacy File Manager' in your cpanel instead of the regular 'File Manager' to delete/edit/rename files. I was able to do it on the sites folder, settings.php and everything.’s picture

Solved issue with Drupal installer requires write permissions to settings.php
What i did was on the advanced installer instead of localhost plugin the database name
It worked for me, it maybe too simple

Pinguis Web Design Ireland