Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By misterlawrence on
Hello! I did a fresh install of Drupal 6.3, and everything works perfectly.
I would now like to make a change to settings.php, but I find that I cannot delete it nor overwrite it, even though I have set the CHMOD to 777 for the file.
Any advice would be greatly appreciated! Unless I can make this change, I am sort of stuck!
-David
Comments
Stuck with chmod
Try using a front end ftp manager to change the access rules, and if it fails, then this may be an issue I once faced.
NAMELY, that in some cases when the server creates files in your folder from the scratch, it assigns to it it's own privileges. Which makes it unwritable (and often times undeletable) for you.
SOLUTION:
1. Contact your hosting support to fix it.
2. Place a dummy settings.php file in the distro next time you upload it to keep the system from owning it.
- Alexei Rayu.
Drupal Related Services | SiteHound 1.2 (based on Drupal 5.9) - Free Download
Correct me if I'm wrong, but
Correct me if I'm wrong, but shouldn't the containing folder *also* have write privileges?
Dave
Get great Drupal hosting at MM Hosting. (I don't work for them; I'm just a very satisfied customer)
true
if you give all folders and files 777 you should be able to remove them.
Had the same problem on
Had the same problem on 1and1 hosting a few days ago, and I basically just gave it a day and then was able to delete the file.
Happened to me on Site 5 too
Drupal 6 protects the settings.php file in a much more efficient way. Trying to change the permissions through FTP did not work on Site 5.
Anyway, on Site 5 you can change the CHMOD when you enable the shell and use it. You can also use their web file manager, which is rudimentary, to change the content of the file, a solution I did use in the end.
I don't mind Drupal 6 being more secure if there are solutions and not left alone.
/*_*/
http://www.xmacinfo.com
I don't think it's a D6 security feature.
D6 in many cases creates a new settings.php file in a new folder for itself. And that my result in that problem under some circumstances.
- Alexei Rayu.
Drupal Related Services | SiteHound 1.2 (based on Drupal 5.9) - Free Download
Fast Way
The fastest way
Make a page with this code:
replace "path/to/file" with your path to the file, ex: sites/default
That should do it for you.
Oh..important, delete that page as soon as your done!!!
Great
Great and simple.
One Important thing
I think its important to note that you need not include the file name. Just the path to the file directory.
sites/default
Really fast
thanks so very much. It worked like a magic.
all folders above
all folders above settings.php must have r-w permissions
folder permissions
that's the one that did it for me - changed all parent permissions
It worked for me..!!
That helped me.
Changes all the parent folders permission to write..
Thanks.
Can't overwrite settings.php despite CHMOD #777
Using Webspace Explorer in 1and1 I CHMOD'd the Default folder to 777. Deleted the file (in my case civicrm.settings.php) and reset the folder permissions to 500.
I had this issue, but noticed
I had this issue, but noticed there are no write permissions on the sites/default folder. Same thing for the sites/default/file folder. Do a chmod 777 on these and you can erase the files inside those folders. Just spotted this in several earlier posts - sorry for the redundant info.
I had the same issue with
I had the same issue with 1and1 and it's been a huge issue, always had to get tech support to delete these files for me. While I had set chmod to 777 on the files, the folder had been set to 555. Apparently the folder permissions propagate to the files? Either way, I set the containing folder to 777, now I can delete the files within (as well as the folder).
3 years later still the case...
same hosting provider same issue and same solution. Just set 777 to all "lower" folders and then you can delete setting.php.
Change Default folder permissions
I too got stuck not being able to delete or rename the settings.php file on the server. Solution: change the permissions on the Default folder or whatever the surrounding folder is titled. This worked for me when upgrading to Drupal 6.22.
one more thing I just
one more thing I just discovered in case others have this same problem:
"You need to add permissions to write not only the settings file but also the folder where it is."
http://drupal.org/node/821926#comment-3838210
Tried CHMOD parent folder but no go!
My problem is that during an import of files using Blogger Importer I accidentally created a folder to store the imported files at sites/default/files/sites. Whatever I do I can't delete the "second" sites folder or its files or subfolders. I've tried CHMODing to 777 all the files and folders from root/sites downwards but this works for every folder/file *except* the "second" sites folder and within. I guessed it might be to do with there not being a settings.php file inside the second sites/default folder, but I can't write to that folder so can't put settings files there anyway. I really want to delete this entire folder and start the Blogger import again, not least because now when I use the media browser, all the files I imported are showing up in "library" and these are not appropriate. Help!
Solved
I gave the write permission to default folder and then I'm able to delete/update/rename settings file.
Thanks :)