Änderungen an der globalen Konfiguration lassen sich nicht speichern
From Joomla! Documentation
Im Konfigurations-Bereich des Administrator-"Backends" wird nach Klick auf den "Speichern"- oder "Speichern & Schließen"-Button, um Änderungen der Seiten-Konfiguration zu speichern, erscheint folgende Fehler-Meldung: “An Error has occurred! Could not write to the configuration.php file!”, möglicherweise auch “JFTP::write: Bad response”, wenn FTP aktiviert ist.
Gründe für den Fehler
Das Konfigurations-Update-Skript von Joomla! konnte die Inhalte der “configuration.php" nicht ändern, um Änderungen der globalen Konfiguration zu speichern. Joomla! konnte nicht in die Datei schreiben und / oder konnte die Datei nicht schreibbar machen (z.B. R/W). Seit Joomla! 1.5.x versucht, die “configuration.php” vor dem Speichern schreibbar zu machen, ist die zweite Variante wahrscheinlicher. Die wahrscheinlichste Ursache ist, dass die “configuration.php” Eigentum eines anderen Benutzers ist als der, der die Änderungen versucht. Wenn die globale Konfiguration mit aktiviertem FTP verändert werden, wird es dir FTP-Login-ID sein; ist FTP nicht aktiviert wird es ein Web-Server-Prozess sein (oft als sowas wie "apache" oder "www-data" benannt). (Man kann üblicherweise die Datei-Eigentumsrechte mit der Einwahl in die Seite mittels FTP-Programm prüfen. Alternativ kann man eXtplorer verwenden - siehe unten). Leider wird man aus dem gängigen Update der globalen Konfiguration ausgesperrt, da das aktivieren und deaktivieren des FTP-Modus (und dadurch Änderung der Identität beim Versuch, die Konfiguration zu ändern) von der globalen Konfiguration selbst festgelegt wird.
Empfohlene Lösungen
Eigentum
Änderung des Eigentums der “configuration.php” entsprechend der FTP-Login-ID bei "FTP aktiviert" oder der Web-Server-Prozess-Identität bei "FTP nicht aktiviert".
Bei einem geteilten Server sollte man den technischen Support der eigenen Organisation oder des Web-Hosting-Providers kontaktieren, das Problem beschreiben und ersuchen, die Datei-Eigentumsrechte entsprechend zu ändern.
Use an Extension
Install the eXtplorer component (obtainable from the Joomla! Extensions Directory - Category File Management) – if not already in place. This will allow you to view and manipulate files in both “file” mode (using the web server process user identity) or “ftp” mode using your FTP login user identity. Although you will probably not be able to change the file ownership with this tool, you can use one of the modes to make “configuration.php” writeable for all users. This will enable you to change to the Global Configuration once – or more if you include in that a change to the FTP mode so that it matches the ownership of your “configuration.php” file (but see Note below).
NOTE: changing the FTP mode will affect the ownership applied to files uploaded to the site under the new setting (e.g. when installing extensions). File ownership advice from ianmac
Check PHP Ownership
Get your web server to run PHP as CGI or FastCGI. This ensures that the PHP code is executed using the same user ID as used when uploading the Joomla code using FTP. Thus there is no conflict as the ID of the PHP process changing “configuration.php” file is the same as the file's owner. If you do not know how to set CGI or Fast CGI, contact your server administrator or hosting service provider for advice.
Background
The above is a simplified explanation, but the following may be of interest and value to all, and also help expert users formulate their own solution to this problem.
- The file “configuration.php” is generated automatically in the site’s root folder (from “configuration.php-dist”) during site installation and incorporates in it the site-specific information given during the install process. Changes made in the Global Configuration area in the site's administrative “back-end” are written to “configuration.php” when the either the “Save” or “Save&Close” button is used.
- Whenever Joomla! attempts to update “configuration.php” file it first attempts to make it writeable, and after updating the file make it unwriteable (i.e. read-only) as a security precaution.
- Files on the web server hosting your Joomla! site will be owned by one of several entities, depending on how they were placed or created on the server. Generally files on a Joomla! site will be owned by either of two user identities:
- Files you upload by FTP or installed with FTP mode active will generally be allocated ownership of a user ID corresponding to your FTP login ID for that site,
- Files installed from within Joomla! and with FTP mode inactive will generally be allocated ownership by the “phantom” user ID that used to run the main web server processes as well as your Joomla! scripts (often named as something like “apache” or “www-data”).