Hello bacula developers,

we found that the bacula start scripts do not start the bacula daemons
with the parameters for user and group. 
As a result, the daemons always run as root/root.

I have attached a patch that patches the template files for the start scripts 
, so that the daemons are started correctly.

To enable a smooth upgrade from prior suse rpms, I added the following 
lines to the spec file:

--
%if %{suse}
# fix permissions for suse, as until now
# deamons always ran as root/root
if [ "$1" -gt 1 ] ; then
 echo "fixing permissions for conmsg and log files because of update ..."
 echo "update of user and group on suse systems..."
 for f in  %{working_dir}/*.conmsg %{working_dir}/log*; do
        if [ -f $f ]; then
                chown %{director_daemon_user}.%{daemon_group} $f -c
        fi
 done
fi
%endif
--

This fixes the permissions of the bacula log files and conmsg files, as 
otherwise the bacula-dir cannot open the log and conmsg files. 

Of course, the rights of the backup devices have also to be checked, but this 
has to be done manually in my view.

best regards,

Philipp

diff -ruN bacula-5.0.3_patched//platforms/suse/bacula-dir.in bacula-5.0.3/platforms/suse/bacula-dir.in
--- bacula-5.0.3_patched//platforms/suse/bacula-dir.in	2010-08-05 16:29:51.000000000 +0200
+++ bacula-5.0.3/platforms/suse/bacula-dir.in	2011-03-25 19:39:42.000000000 +0100
@@ -29,7 +29,7 @@
 case "$1" in
     start)
        echo -n "Starting the Bacula Director: "
-       /sbin/startproc @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
+       /sbin/startproc @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf -u @dir_user@ -g @dir_group@
        RETVAL=$?
        rc_status -v
        echo
diff -ruN bacula-5.0.3_patched//platforms/suse/bacula-fd.in bacula-5.0.3/platforms/suse/bacula-fd.in
--- bacula-5.0.3_patched//platforms/suse/bacula-fd.in	2010-08-05 16:29:51.000000000 +0200
+++ bacula-5.0.3/platforms/suse/bacula-fd.in	2011-03-25 19:39:07.000000000 +0100
@@ -28,7 +28,7 @@
 case "$1" in
     start)
        echo -n "Starting the Bacula File daemon: "
-       /sbin/startproc @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
+       /sbin/startproc @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf -u @fd_user@ -g @fd_group@
        RETVAL=$?
        rc_status -v
        echo
diff -ruN bacula-5.0.3_patched//platforms/suse/bacula-sd.in bacula-5.0.3/platforms/suse/bacula-sd.in
--- bacula-5.0.3_patched//platforms/suse/bacula-sd.in	2010-08-05 16:29:51.000000000 +0200
+++ bacula-5.0.3/platforms/suse/bacula-sd.in	2011-03-25 19:39:23.000000000 +0100
@@ -28,7 +28,7 @@
 case "$1" in
     start)
        echo -n "Starting the Bacula Storage daemon: "
-       /sbin/startproc @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
+       /sbin/startproc @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf -u @sd_user@ -g @sd_group@
        RETVAL=$?
        rc_status -v
        echo
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to