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

2020media’s picture

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?

seanray’s picture

The file is read-only after the installation, you need to set it to be "Write", then you could modify it.

hoangbien’s picture

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.

alex_shapka’s picture

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.

nilashis’s picture

@hoangbien - were you able to find a solution? how did you finally edit settings.php?

praveenkv1988’s picture

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.

thekraken22’s picture

Ah, the pains of permissions..

jgprentice’s picture

I had this same problem but I went into the file properties and unchecked read-only and that did it.

greenwork’s picture

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

VM’s picture

This question is better suited in the 'post installation' forum. Please edit the opening post and move it. Thanks.

greenwork’s picture

edit

====================================
Website:LEED Exam V4