-
Problem report
-
Resolution: Fixed
-
Minor
-
5.4.2
-
Ubuntu 20.04 using Zabbix package repository
-
Sprint 78 (Jul 2021)
-
0.5
Steps to reproduce:
- Follow install instructions for Ubuntu 20.04 on Zabbix Downloads
- Navigate to frontend for installation setup
- On final screen, you will get an error stating the configuration file cannot be created
Result:**
See attached screenshot.
The reason the configuration file creation now fails is because with the package setup:
- `/etc/zabbix/web` is owned by www-data (so writable by php-fpm)
- `/usr/share/zabbix/conf/zabbix.conf.php` is a dead symlink prior to setup that points to `/etc/zabbix/web/zabbix.conf.php`
- the CConfigFile.php attempts to write to `/usr/share/zabbix/conf/zabbix.conf.php`
- the commit below changed the logic for evaluating whether the file is writable
$file_is_writable variable has been modified to have a check on whether the dirname itself is writable:
is_writable(dirname($file))
The value of $file is /usr/share/zabbix/conf/zabbix.conf.php.
This checks whether the dir /usr/share/zabbix/conf is writable, which it is not (owned by root).
The fix is probably something along the lines of using is_link and readlink to determine the TRUE path.
if is_link($file) {
$file = readlink($file)
}
- depends on
-
ZBX-19724 Cannot create the configuration file.
- Closed