Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joomla 3.4.3 - configuration.php not writable

Using MariaDB, Apache, PHP 5.4.x, RHEL 7

How do I allow configuration.php to be written to?

Installed Joomla several times, always ending up with the configuration.php file not writable. I proceeded, copied the config content and created a new php file, placed it where Joomla lives, opened up the permissions, changed to apache:apache, still nothing. I've referenced several articles, notably this one: Installing Joomla 3 Error: Your configuration file or directory is not writable

I have also tried creating an empty configuration.php file and placing it in the joomla root, opening up permissions - didnt work.

My current state of installation is configuration.php file in place, but unable to remove the installation directory via the web installer (assuming because I shoehorned the config file into place and still not being writable).

I've tried several permissions setups then attempting to remove the install directory without success. Manually removing the install directory via rm -r only yields a totally inaccessible site forcing me to wipe my joomla files, databases, and install again. Thanks in advance.

like image 383
V1GG3N Avatar asked Nov 18 '25 16:11

V1GG3N


1 Answers

The first thing I would do is check what user php runs at on your server, and compare this with ownership of your site files.

Create user.php file at the root of your domain with

<?php echo exec('whoami'); ?>   

then open that file with your broser. This will give you the name of the user that php runs as on your server. It may be apache but it may not.

Compare this user with the ownership of config.php and your site installation as a whole.

If you upload a new Joomla site via SFTP and follow the standard browser instal steps, permissions shouldn't be a problem. If you are say uploading a zip file and using a terminal connection and SSH, make sure your SSH connection is the same user as the php user on your server.

Good luck!

like image 86
David Taiaroa Avatar answered Nov 21 '25 06:11

David Taiaroa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!