Hello Eric,

thank you for your feedback.

Am Mittwoch, 30. März 2011, 10:07:11 schrieb Eric Bollengier:
> Hello Philipp,
> 
> Le dimanche 27 mars 2011 11:03:24, Philipp Storz a écrit :
> > 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.
> 
> Can you make a try to add the -u and -g option to the startproc program
> instead of the bacula daemon?
> 
> When you have a problem such as a segfault, the process can't attach gdb to
> itself because the uid/gid changed from root to a normal user (ptrace
> problem).
> 
> I don't know if suse has this problem or not, can you try the backtrace
> generation with a simple kill -ABRT $(pidof bacula-dir) ? You should find
> the backtrace file somewhere with full information.

This is the result when I start the bacula dir with -u and -g options: 
-------------
Bacula interrupted by signal 6: IOT trap
Kaboom! bacula-dir, bacula-devel-dir got signal 6 - IOT trap. Attempting 
traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/bacula-dir 10205 /var/lib/bacula
execv: /usr/sbin/btraceback failed: ERR=Permission denied
------
As you can see, yes, there is the problem you mentioned. 


When I put the user and group in the startproc call, I get this problem:

----
Starting the Bacula Director: startproc:  cannot execute /usr/sbin/bacula-dir: 
Permission denied
startproc:  exit status of parent of /usr/sbin/bacula-dir: 4
----
then I tried to fix the ownership:
--
chown bacula.root /usr/sbin/bacula-dir 
Starting the Bacula Director: 30-Mar 11:33 bacula-dir: ERROR TERMINATION at 
bsys.c:426
Cannot open pid file. /var/run/bacula-dir.9101.pid ERR=Permission denied
--
So, by putting the user and group into the startproc call, we get a lot of 
permission problems. 



The easiest way to have the btraceback run without having permission problems 
is giving the bacula user the right to run btraceback:

--
chown bacula.root /usr/sbin/btraceback

kill -ABRT 10781
Bacula interrupted by signal 6: IOT trap
Kaboom! bacula-dir, bacula-devel-dir got signal 6 - IOT trap. Attempting 
traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/bacula-dir 10781 /var/lib/bacula
It looks like the traceback worked ...
Dumping: /var/lib/bacula/bacula-devel-dir.10781.bactrace
--

Is this a possible solution? We only have to give the ownership of 
"btraceback" binary to bacula/root, and everything works OK.

I think that would be an easy way, and I see no problems with this, do you?

Best regards,

Philipp



------------------------------------------------------------------------------
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