Cannot save Global Configuration changes/ru: Difference between revisions

From Joomla! Documentation

Created page with "Не удается сохранить изменения общих настроек"
 
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude><languages /></noinclude>
<noinclude><languages /></noinclude>
After entering the Global Configuration area on the site Administrator “back-end” and then clicking on either the “Save” or “Apply” button to save the current choice of site configuration, the following error message appears:
<div class="mw-translate-fuzzy">
“An Error has occurred! Unable to open configuration.php file to write!”, possibly accompanied by: “JFTP::write: Bad response” if you are working in FTP enabled mode.
После входа в общие настройки в административной панели сайта и щелчка либо на [кнопку] "Сохранить", либо на [кнопку] "Сохранить и закрыть" для сохранения внесенных в настройки сайта изменений, появляется следующее сообщение об ошибке: “An error has occurred! Could not write to the configuration.php file”, которое, возможно, будет дополнено [сообщением об ошибке]: “JFTP::write: Bad response”, если Вы работаете во включенном режиме FTP.
</div>


== Reason for this error ==
== Причина этой ошибки ==


The configuration update script in Joomla! has been unable to change the contents of the file “configuration.php” to reflect any changes you made on the Global Configuration page. Joomla! has either been unable to write to the file and/or unable to make the file writeable (i.e. R/W). Since Joomla! 1.5.x attempts to make “configuration.php” writeable before saving the configuration, the latter is more usually the case.
<div class="mw-translate-fuzzy">
The most common reason for this is that the file “configuration.php” is owned by a different logical user to the one trying to make the change.  If you are trying to change Global Configuration with FTP enabled, the latter will usually be your FTP login ID; with FTP disabled it will be a web server process identity (often named as something like “apache” or “www-data”).
Скрипт обновления конфигурации Joomla! не смог изменить содержимое файла "configuration.php" чтобы ввести в действие любые сделанные Вами в общих настройках изменения. Joomla! либо не смогла вписать в этот файл либо/и не смогла сделать этой файл открытым на запись (как R/W). Последнее случается чаще всего, поскольку начиная с Joomla! 1.5.x попытки сделать файл "configuration.php" открытым на запись происходят перед сохранением конфигурации.
(You can usually check on file ownership details by logging in to your site with an FTP program. Alternatively you could use eXtplorer – see below).
</div>
Unfortunately, you will be locked out of changing to the appropriate mode to update the Global Configuration as the enabling and disabling of FTP mode (and thus changing the logical identity attempting to change the configuration) is determined by the Global Configuration data held in that file.


== Suggested solutions ==
The most common reason for this is that the ''configuration.php'' file is owned by a different logical user than the one trying to make the change. If you are trying to change Global Configuration with FTP enabled, the latter will usually be your FTP login ID; with FTP disabled it will be a web server process identity (often named ''apache'' or ''www-data'').
{{note|Do not make the “configuration.php” file writeable for all users. The result is you will be be able to update the Global Configuration only once. After the initial save, Joomla! will make that file read-only for all users and the problem will exist again.|type=serious}}


=== Ownership ===
<div class="mw-translate-fuzzy">
Change the ownership of the “configuration.php” file to match either your FTP login ID if using “FTP enabled” for the site, or the web server process identity if you are using “FTP disabled”.  
(Проверить кто обладает каким-либо файлом и с какими правами можно обычно открыв этот файл с помощью какого-либо клиента FTP. Альтернативно Вы можете использовать [для этого расширение системы Joomla] eXtplorer - смотрите [ссылку на него] ниже).  К сожалению, Вы будете заблокированы от [возможности] переключиться на соответствующий режим изменением общих настроек, так как включение и выключение FTP режима (и таким образом изменение логического объекта, пытающегося изменить данную конфигурацию) определяется имеющимися по тому файлу [системными] данными по общим настройкам.
</div>


{{note|This is not something that you can do within Joomla!. If you have total control of the server (e.g. local server or virtual server) then you should be able to do this using an appropriate utility (such as “chown” for a Linux server).}}
== Рекомендуемые решения ==
{{note|<div class="mw-translate-fuzzy">
Не открывайте файл “configuration.php” на запись всем пользователям. Если Вы это выполните, то в результате Вы сможете изменить общие настройки только один раз. После этого [система] Joomla сделает этот файл только читаемым всеми пользователями и данная проблема останется.
</div>|type=serious}}


On a shared server, you should contact the technical support for your organisation or your web hosting provider, explain the problem, and ask them change the file ownership appropriately.
=== Владение ===
<div class="mw-translate-fuzzy">
Изменяйте владение файлом “configuration.php” так, чтобы оно соответствовало, в случае если FTP режим включен, ID номеру авторизирующегося по FTP пользователя или, если режим FTP выключен, идентификатору процесса [данного] веб сервера.
</div>


=== Use an Extension ===
{{note|<div class="mw-translate-fuzzy">
Это не то, что Вы можете выполнить внутри [системы] Joomla. Если Вы обладаете полноым контролем над данным сервером (например, местным или виртуальным), то Вы должны иметь возможность выполнить это с помощью соответствующией утилиты (такой, как “chown” на сервере Linux).
</div>}}


Install the eXtplorer component (obtainable from the Joomla! Extensions Directory – {{jsite|ext}}) – 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).<br />'''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). [[Why_can%27t_you_install_any_extensions%3F#File_ownership_advice_from_ianmac|File ownership advice from ianmac]]
На сервере, который Вы разделяете с другими, Вам следует связаться со службой [его] технической поддержки или со своим хостинговым провайдером, объяснить им данную проблему и попросить их изменить соответствующего владельца файла.
 
=== Использование какого-либо расширения ===
 
Install the eXtplorer component (obtainable from the Joomla! Extensions Directory - Category [https://extensions.joomla.org/tags/file-management/ 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). [[Why_can%27t_you_install_any_extensions%3F#File_ownership_advice_from_ianmac|File ownership advice from ianmac]]


=== Check PHP Ownership ===
=== 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.
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 ==
== Background ==
Line 32: Line 46:
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 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 “Apply” button is used.
* The file ''configuration.php'' is generated automatically in the site’s root folder (from ''configuration.php-dist'') during site installation and incorporates 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.
* 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 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 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”).
*# 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 ''apache'' or ''www-data'').
<noinclude>
<noinclude>
[[Category:FAQ]]
[[Category:FAQ]]
[[Category:Administration FAQ]]
[[Category:Administration FAQ]]
[[Category:Version 1.5 FAQ]]
[[Category:Global Configuration Management]]
[[Category:Global Configuration Management]]
[[Category:Needs updating]]
</noinclude>
</noinclude>

Latest revision as of 22:51, 21 July 2020

После входа в общие настройки в административной панели сайта и щелчка либо на [кнопку] "Сохранить", либо на [кнопку] "Сохранить и закрыть" для сохранения внесенных в настройки сайта изменений, появляется следующее сообщение об ошибке: “An error has occurred! Could not write to the configuration.php file”, которое, возможно, будет дополнено [сообщением об ошибке]: “JFTP::write: Bad response”, если Вы работаете во включенном режиме FTP.

Причина этой ошибки

Скрипт обновления конфигурации Joomla! не смог изменить содержимое файла "configuration.php" чтобы ввести в действие любые сделанные Вами в общих настройках изменения. Joomla! либо не смогла вписать в этот файл либо/и не смогла сделать этой файл открытым на запись (как R/W). Последнее случается чаще всего, поскольку начиная с Joomla! 1.5.x попытки сделать файл "configuration.php" открытым на запись происходят перед сохранением конфигурации.

The most common reason for this is that the configuration.php file is owned by a different logical user than the one trying to make the change. If you are trying to change Global Configuration with FTP enabled, the latter will usually be your FTP login ID; with FTP disabled it will be a web server process identity (often named apache or www-data).

(Проверить кто обладает каким-либо файлом и с какими правами можно обычно открыв этот файл с помощью какого-либо клиента FTP. Альтернативно Вы можете использовать [для этого расширение системы Joomla] eXtplorer - смотрите [ссылку на него] ниже). К сожалению, Вы будете заблокированы от [возможности] переключиться на соответствующий режим изменением общих настроек, так как включение и выключение FTP режима (и таким образом изменение логического объекта, пытающегося изменить данную конфигурацию) определяется имеющимися по тому файлу [системными] данными по общим настройкам.

Рекомендуемые решения

Владение

Изменяйте владение файлом “configuration.php” так, чтобы оно соответствовало, в случае если FTP режим включен, ID номеру авторизирующегося по FTP пользователя или, если режим FTP выключен, идентификатору процесса [данного] веб сервера.

На сервере, который Вы разделяете с другими, Вам следует связаться со службой [его] технической поддержки или со своим хостинговым провайдером, объяснить им данную проблему и попросить их изменить соответствующего владельца файла.

Использование какого-либо расширения

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 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:
    1. 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,
    2. 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 apache or www-data).