Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18695

file_put_contents runtime error observed when the webserver doesn't have rights to update zabbix.conf.php

    XMLWordPrintable

    Details

    • Team:
      Team C
    • Sprint:
      Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021), Sprint 75 (Apr 2021), Sprint 76 (May 2021)
    • Story Points:
      0.125

      Description

      Problem description: If the webserver doesn't have rights to update the zabbix.conf.php file, the following runtime error is observed along with the error message in frontend, when completing zabbix frontend setup form (setup.php):

      file_put_contents(/home/jenkins/workspace/zabbix-dev/frontend/sources/ui/conf/zabbix.conf.php): failed to open stream: Permission denied [setup.php:130 -> CTag->__construct() -> CTag->addItem() -> CObject->addItem() -> CTag->addItem() -> CObject->addItem() -> unpack_object() -> CTag->toString() -> CSetupWizard->bodyToString() -> CSetupWizard->getStage() -> CSetupWizard->stage5() -> CConfigFile->save() -> file_put_contents() -> CConfigFile->{closure}() in include/classes/core/CConfigFile.php:190]
      

      No runtime errors should be thrown, only the frontend error message should be shown.

      Steps to reproduce:

      1. Make sure Your webserver doesn't have permissions to update the zabbix.conf.php file.
      2. Open zabbix frontend configuration form (setup.php)
      3. Go through all sections of this form untill You reach "Install" section
      4. In the "Install" section press "Finish" button - make sure that the "Cannot create the configuration file" error message is displayed
      5. Check for runtime errors.

      Result: the previously mentioned runtime error is observed.

      Expected: no runtime errors should be thrown, only the frontend error message should be shown.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vmaksimovs Vladimirs Maksimovs
              Reporter:
              solonkins Sergejs Olonkins
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: