write access to settings.php

tandonian - November 4, 2006 - 12:07

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?

They are set to read/write

cog.rusty - November 4, 2006 - 15:31

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).

This Dude is Right!!!

bridewell - July 15, 2008 - 00:12

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!

777

effennel - December 11, 2006 - 04:25

How about:

chmod to 777
Run the installer
chmod to 755

here is my sites/default

saneax - January 24, 2007 - 11:03

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 http://drupal.org/requirements
and everything seems good. except.. when I run.. http://www.example.com 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'
http://saneax.blogspot.com
http://p2pconnect.astahost.com

Same problem, even w/ 777

mkzelda - January 28, 2007 - 06:47

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

What worked for me

lastrock - January 31, 2007 - 03:24

I had the same problem.

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

Check permissions!

lastrock - January 31, 2007 - 03:31

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.

127.0.0.1

ben_c - September 22, 2007 - 01:51

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

I use MacOSX and XAMPP

"Drupal and the Power of Categories (Taxonomy)"
http://digitalsolutions.ph/couchkamotereviews/power_drupal_categories

This also worked for

nawill81 - March 21, 2008 - 23:48

This also worked for me.

Thanks

Tried fix, still not working

dianaltg - July 15, 2008 - 04:12

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?

So did you create manually

Avitohol - July 15, 2008 - 06:24

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

Huzzah

dianaltg - July 15, 2008 - 15:50

That's it. Thanks!

"permissions so that it is writable by the web server" XAMPP?

wesinbrooklyn - January 21, 2009 - 05:20

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.

Solution!

Vako - January 20, 2009 - 07:37

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.

Thanks, But for local??

wesinbrooklyn - January 21, 2009 - 04:21

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.

Yes, works for me as well, thanks

hbarnard - May 28, 2009 - 07:03

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.

Check folder permissions

rbiffl - February 4, 2009 - 15:40

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.

 
 

Drupal is a registered trademark of Dries Buytaert.