[pkg-bacula-devel] Bug#714161: bacula-director-mysql: run AfterJob "/etc/bacula/scripts/delete_catalog_backup": ERR=Permission denied
Luca Capello
luca at pca.it
Wed Jun 26 14:10:31 UTC 2013
Package: bacula-director-mysql
Version: 5.2.6+dfsg-9
Severity: normal
Tags: patch
User: contact at itopie.ch
Usertags: itopie.ch-backup
Hi there,
on a fresh Bacula Director installation I get the following error at the
end of the BackupCatalog default job:
JobId N: shell command: run AfterJob "/etc/bacula/scripts/delete_catalog_backup"
JobId N: Error: Runscript: AfterJob returned non-zero status=200. ERR=Permission denied
The reason is quite clear, despite the permissions being correct in the
"source" file:
=====
# ls -l /etc/bacula/scripts/delete_catalog_backup
-rw------- 1 root root 104 Jun 26 14:07 /etc/bacula/scripts/delete_catalog_backup
# ls -l /usr/share/bacula-common/defconfig/scripts/delete_catalog_backup
-rwxr-xr-x 1 root root 112 Apr 23 22:05 /usr/share/bacula-common/defconfig/scripts/delete_catalog_backup
#
=====
The problem is in /var/lib/dpkg/info/bacula-director-mysql.postinst:72
and /usr/share/bacula-common/common-functions.dpkg:95:
--8<---------------cut here---------------start------------->8---
70 DBNAME="$dbc_dbname"
71 SUBST_VARIABLES=DBNAME
72 install_config \
73 bacula-director-mysql \
74 /usr/share/bacula-common/defconfig/scripts/delete_catalog_backup \
75 /etc/bacula/scripts/delete_catalog_backup
--8<---------------cut here---------------end--------------->8---
Given how we treat such files (not really conffiles, but still), IMHO
the easiest solution is to manually set the permissions in .postinst:
--8<---------------cut here---------------start------------->8---
--- /var/lib/dpkg/info/bacula-director-mysql.postinst 2013-04-24 00:07:03.000000000 +0200
+++ bacula-director-mysql.postinst 2013-06-26 16:04:52.023481015 +0200
@@ -73,6 +73,7 @@
bacula-director-mysql \
/usr/share/bacula-common/defconfig/scripts/delete_catalog_backup \
/etc/bacula/scripts/delete_catalog_backup
+ chmod 755 /etc/bacula/scripts/delete_catalog_backup
sh $POSTINST_COMMON
--8<---------------cut here---------------end--------------->8---
Thx, bye,
Gismo / Luca
-- System Information:
Debian Release: 7.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bacula-director-mysql depends on:
ii bacula-common 5.2.6+dfsg-9
ii bacula-common-mysql 5.2.6+dfsg-9
ii bacula-director-common 5.2.6+dfsg-9
ii dbconfig-common 1.8.47+nmu1
ii debconf [debconf-2.0] 1.5.49
ii libc6 2.13-38
ii libcap2 1:2.22-1.2
ii libgcc1 1:4.7.2-5
ii libpython2.7 2.7.3-6
ii libssl1.0.0 1.0.1e-2
ii libstdc++6 4.7.2-5
ii libwrap0 7.6.q-24
ii mysql-client-5.5 [mysql-client] 5.5.31+dfsg-0+wheezy1
ii ucf 3.0025+nmu3
ii zlib1g 1:1.2.7.dfsg-13
Versions of packages bacula-director-mysql recommends:
ii mysql-server 5.5.31+dfsg-0+wheezy1
Versions of packages bacula-director-mysql suggests:
pn gawk <none>
-- debconf information:
bacula-director-mysql/db/dbname: bacula
bacula-director-mysql/mysql/method: unix socket
bacula-director-mysql/unsafe-director-password-was-changed:
bacula-director-mysql/remote/host:
bacula-director-mysql/internal/reconfiguring: false
bacula-director-mysql/passwords-do-not-match:
bacula-director-mysql/upgrade-error: abort
bacula-director-mysql/mysql/admin-user: root
bacula-director-mysql/dbconfig-upgrade: true
bacula-director-mysql/dbconfig-reinstall: false
bacula-director-mysql/purge: false
bacula-director-mysql/remove-error: abort
bacula-director-mysql/remote/port:
bacula-director-mysql/dbconfig-remove:
bacula-director-mysql/missing-db-package-error: abort
bacula-director-mysql/remote/newhost:
bacula-director-mysql/internal/skip-preseed: false
* bacula-director-mysql/dbconfig-install: true
bacula-director-mysql/db/app-user: bacula
bacula-director-mysql/upgrade-backup: true
bacula-director-mysql/database-type: mysql
bacula-director-mysql/install-error: abort
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-bacula-devel/attachments/20130626/a62b10c4/attachment.sig>
More information about the pkg-bacula-devel
mailing list