Bug 829509 - bacula-sd run as wrong group
bacula-sd run as wrong group
Product: Fedora
Classification: Fedora
Component: bacula (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Simone Caronni
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-06 19:51 EDT by Jonathan Underwood
Modified: 2012-06-11 20:36 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-11 20:36:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Underwood 2012-06-06 19:51:12 EDT
Description of problem:
In /etc/sysconfig/bacula-sd the users and group that the daemon is run as are specified as:


However, the various tape drive device nodes are created as group "tape" not "disk". Eg. 

$ ls -l /dev/nst0
crw-rw----. 1 root tape 9, 128 Jun  7 00:02 /dev/nst0

This means bacula-sd hits a permission error when trying to access such devices.

The correct fix is to have the following in /etc/sysconfig/bacula-sd

Also observed here:


I personally hit this when using the bacula-5.2.6 rpms rebuilt for RHEL 6, but I'm sure it affects current Fedora releases too.

Version-Release number of selected component (if applicable):
Comment 1 Simone Caronni 2012-06-08 03:59:58 EDT

you're right, I'll push a change in the next package.
Since the package can be built back to RHEL 5, I'll make a conditional for it.

Comment 2 Simone Caronni 2012-06-08 04:20:59 EDT
I'm building now the package in Koji, when it is available in updates-testing please bear the following:

The symlink library name has changed because we discovered a bug during version upgrades.

Please issue the following before upgrading:

alternatives --remove /usr/lib64/libbaccats-mysql-5.2.6.so
alternatives --remove /usr/lib64/libbaccats-sqlite3-5.2.6.so
alternatives --remove /usr/lib64/libbaccats-postgresql-5.2.6.so

And then set again your preference database with:

# alternatives --config libbaccats.so

There are 3 programs which provide 'libbaccats.so'.

  Selection    Command
   1           /usr/lib64/libbaccats-mysql.so
 + 2           /usr/lib64/libbaccats-sqlite3.so
*  3           /usr/lib64/libbaccats-postgresql.so

Enter to keep the current selection[+], or type selection number:
Comment 3 Fedora Update System 2012-06-08 04:37:33 EDT
bacula-docs-5.2.7-1.fc17,bacula-5.2.7-4.fc17 has been submitted as an update for Fedora 17.
Comment 4 Fedora Update System 2012-06-08 20:08:25 EDT
Package bacula-docs-5.2.7-1.fc17, bacula-5.2.7-4.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bacula-docs-5.2.7-1.fc17 bacula-5.2.7-4.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Simone Caronni 2012-06-11 05:54:50 EDT
5.2.8 has come out upstream with many other bugs fixed.

I introduced a change in the spec file that checks for the obsolete symlinks for bacula-dir, bacula-sd (>=F16) and libbaccats-backend-version.so (=F17) and sets the new one accordingly so the change should not be done manually.

So even an upgrade from F16 to F17 should be safe and retain the preferences.

Excerpt from the spec file:

# Fix for automatic selection of backends during upgrades
if readlink /etc/alternatives/libbaccats.so | grep --silent mysql || \
   readlink /etc/alternatives/bacula-dir | grep --silent mysql || \
   readlink /etc/alternatives/bacula-sd | grep --silent mysql; then
   /usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-mysql.so
elif readlink /etc/alternatives/libbaccats.so | grep --silent sqlite || \
   readlink /etc/alternatives/bacula-dir | grep --silent sqlite || \
   readlink /etc/alternatives/bacula-sd | grep --silent sqlite; then
   /usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-sqlite3.so
   /usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-postgresql.so

Comment 6 Fedora Update System 2012-06-11 06:18:11 EDT
bacula-docs-5.2.8-1.fc17,bacula-5.2.8-1.fc17 has been submitted as an update for Fedora 17.
Comment 7 Fedora Update System 2012-06-11 20:36:33 EDT
bacula-docs-5.2.8-1.fc17, bacula-5.2.8-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.