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 hoangbien on
Hello everybody,
when i upload my website to hosting. I config settings.php file, the website run ok. Now i want to change settings.php file. when i edited it, my hosting message "Unable to save your changes" and unable to open settings.php for writing. when i edited by dreamweaver, so i upload by filezilla "Error: Critical file transfer error". How i can change settings.php file.
Please help me,
Thanks,
Comments
Can you see the file
Can you see the file ownership and permissions on the settings.php file?
How did you upload it in the first place? Was it by FTP?
The file is read-only after
The file is read-only after the installation, you need to set it to be "Write", then you could modify it.
I set it to be "write", so I can't modify it.
Thanks sianray,
I set it to be "write", but I can't modify it and I don't upload other settings.php file overwrite it.
This issue is definitely
This issue has definitely something with either file ownership or permission. How do you access your server, ssh or ftp?
Run 'ls -l' and see you have the right ownership and file permissions. If you don't, the run 'chown username.username settings.php' and 'chmod 0755 settings.php'.
If after running these commands you still can not write to the file for some reason, then delete it 'rm settings.php' or move it elsewhere, for example 'mv settings.php ../' and then copy default.settings.php to settings.php 'cp default.settings.php settings.php' and this should make the file available for editing.
what worked?
@hoangbien - were you able to find a solution? how did you finally edit settings.php?
It seems that file has wrong
It seems that file has wrong ownership. Also, I hope it has ownership of apache. Ask your hosting company to change the ownership of it.
Permissions
Ah, the pains of permissions..
read-only
I had this same problem but I went into the file properties and unchecked read-only and that did it.
Make sure you set the
Make sure you set the permissions back. Don't want to leave any doors open for malicious people. Permissions can drive people crazy
====================================
Website:LEED Exam V4
=-=
This question is better suited in the 'post installation' forum. Please edit the opening post and move it. Thanks.
make sure to change the
edit
====================================
Website:LEED Exam V4