View Issue Details

IDProjectCategoryView StatusLast Update
0000357bareos-coreinstaller / packagespublic2014-12-01 15:33
ReporterdanielAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSanyOS Version3
Summary0000357: Postgressql create scripts causes fallback to default values during database creations
Descriptionroot@barteldan:~# su postgres -c /usr/lib/bareos/scripts/create_bareos_database
Warning: failed to get "dbname" from config, using default value "bareos", see /tmp/bareos-config.4625.log
Warning: failed to get "dbuser" from config, using default value "bareos", see /tmp/bareos-config.4625.log
Warning: failed to get "dbdriver" from config, see /tmp/bareos-config.4625.log
Creating postgresql database
could not change directory to "/root"
CREATE DATABASE
ALTER DATABASE
could not change directory to "/root"
Database encoding OK
Creating of bareos database succeeded.

Steps To Reproducesu postgres -c /usr/lib/bareos/scripts/create_bareos_database
Additional Informationroot@barteldan:/usr/lib/bareos/scripts# cat /tmp/bareos-config.4625.log
executing: /usr/sbin/bareos-dbcheck -B -c /etc/bareos/bareos-dir.conf
03-Nov 17:44 dbcheck: ERROR TERMINATION at parse_conf.c:1175
Config error: Cannot open config file "/etc/bareos/bareos-dir.conf": Permission denied

executing: /usr/sbin/bareos-dbcheck -B -c /etc/bareos/bareos-dir.conf
03-Nov 17:44 dbcheck: ERROR TERMINATION at parse_conf.c:1175
Config error: Cannot open config file "/etc/bareos/bareos-dir.conf": Permission denied

executing: /usr/sbin/bareos-dbcheck -B -c /etc/bareos/bareos-dir.conf
03-Nov 17:44 dbcheck: ERROR TERMINATION at parse_conf.c:1175
Config error: Cannot open config file "/etc/bareos/bareos-dir.conf": Permission denied
TagsNo tags attached.

Activities

frank

frank

2014-11-06 15:28

developer   ~0001040

Usually /etc/bareos is readable by root and bareos only, so if you switch the user to postgres to execute the script, it can not read your configuration.

If you want, you can add postgres to the bareos group on your system or set the suitable rights on /etc/bareos.

Another approach is the modification of the configuration parameters of the involved scripts, see http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-28400029 .

This will be documented more specifically soon.
joergs

joergs

2014-12-01 15:33

developer   ~0001085

added more documentation.

Issue History

Date Modified Username Field Change
2014-11-03 17:59 daniel New Issue
2014-11-03 18:01 daniel Assigned To => frank
2014-11-03 18:01 daniel Status new => assigned
2014-11-03 18:01 daniel Description Updated
2014-11-06 15:28 frank Note Added: 0001040
2014-12-01 10:50 joergs Assigned To frank => joergs
2014-12-01 15:33 joergs Note Added: 0001085
2014-12-01 15:33 joergs Status assigned => closed
2014-12-01 15:33 joergs Assigned To joergs =>
2014-12-01 15:33 joergs Resolution open => fixed