Reportula icon indicating copy to clipboard operation
Reportula copied to clipboard

bconsole: ERROR TERMINATION at parse_conf.c:918 Config error: Cannot open config file "/etc/bacula/bconsole.conf": Permission denied

Open metalcated opened this issue 10 years ago • 4 comments

Running: 2.1.1 lastest commit $ apachectl -v Server version: Apache/2.4.7 (Ubuntu) Server built: Jul 22 2014 14:36:38 $ php -v PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies $ apachectl -t -D DUMP_MODULES | grep rewrite rewrite_module (shared) $ lsb_release -s -d Ubuntu 14.04.1 LTS

I followed the guide (http://www.reportula.org/reportula/documentation-2/reportula-instalation/install-bacula-postgresql-reportula-from-scratch-on-ubuntu-14-04/) on your site to a T and came up with an issue reading the bconsole.conf from the admin site. (Reload Bacula Configuation)

08-Jan 09:29 bconsole: ERROR TERMINATION at parse_conf.c:918 Config error: Cannot open config file "/etc/bacula/bconsole.conf": Permission denied

Correct SUDO rules are in place as described in the documentation: www-data ALL=NOPASSWD: /usr/sbin/bconsole www-data ALL=NOPASSWD: /usr/sbin/bacula-dir

I also tested the sudo rule from command line: su -l www-data -s /bin/sh -c "/usr/bin/sudo /usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf" Connecting to Director localhost:9101 1000 OK: gnsyrbac01-dir Version: 5.2.6 (21 February 2012) Enter a period to cancel a command. * Everything looks good on that end.

In logs: sudo: no tty present and no askpass program specified Not sure what the cause could be, any insight?

metalcated avatar Jan 08 '15 14:01 metalcated

I also added a bunch of stuff in the configurator and found that it all went poof when I tried to re-read the configuration files.

metalcated avatar Jan 09 '15 13:01 metalcated

Tried the same setup on Debian 7.7 and have exactly the same issue.

metalcated avatar Jan 10 '15 14:01 metalcated

Same on Ubuntu 13.10 and 12.04. Not sure how this works or if there is a way around getting this working. Please let me know if there is a way to get this working. Thank You.

metalcated avatar Jan 11 '15 03:01 metalcated

This is the new sudo rule I used.

www-data ALL=NOPASSWD: /usr/sbin/bconsole, /usr/sbin/bacula-dir, /etc/bacula/*, /bin/echo

Changing the /etc/bacula to 777 for testing worked. Seems to be a permissions issue and also I do have the www-data added to the bacula group.

metalcated avatar Jan 11 '15 03:01 metalcated