Scripts are installed in /etc/init.d but no unit files for systemd were
installed. Consequently, I can start everything with the /usr/sbin/bacula
script but "systemctl start bacula-xxx.service" won't work. These service
files seem to be in the source tar but don't get installed.

I had added user bacula to sudoers and as a member of the sudo group whilst
trying to debug this but that was dead end which I should undo now.

Best
Chris


On Fri, 1 Apr 2022, 11:19 pm Martin Simmons, <mar...@lispworks.com> wrote:

> That looks OK, but how are you running the startup scripts?  You mentioned
> sudo before, but they should be run directly as root.
>
> __Martin
>
>
> >>>>> On Fri, 1 Apr 2022 15:40:04 +0100, Chris Wilkinson said:
> >
> > These are the ./configure flags I used. This puts the desired daemon
> > user/group in the startup scripts. I didn't find a --with option to set
> the
> > daemon executable permissions that defaults to 750.
> >
> > #compile
> > cd $target/bacula-$ver
> > PREFIX=/usr/sbin
> > CFLAGS="-g -O2 -Wall" \
> > ./configure \
> >   --bindir=/usr/bin \
> >   --sbindir=/usr/sbin \
> >   --docdir=/usr/html \
> >   --htmldir=/usr/html \
> >   --enable-smartalloc \
> >   --with-scriptdir=/etc/bacula/scripts \
> >   --with-working-dir=/var/lib/bacula \
> >   --with-pid-dir=/var/run/bacula \
> >   --with-logdir=/var/log/bacula \
> >   --with-postgresql \
> >   --with-archivedir=/mnt/usb \
> >   --with-job-email=root@localhost \
> >   --with-dump-email=root@localhost \
> >   --with-hostname=pi-b \
> >   --with-db-name=bacula \
> >   --with-db-user=bacula \
> >   --with-db-password=++++ \
> >   --with-dir-user=bacula \
> >   --with-dir-group=bacula \
> >   --with-fd-user=root \
> >   --with-fd-group=root \
> >   --with-sd-user=bacula \
> >   --with-sd-group=tape
> >
> >
> > Regards
> > Chris Wilkinson
> >
> > On Fri, 1 Apr 2022, 12:47 pm Martin Simmons, <mar...@lispworks.com>
> wrote:
> >
> > > >>>>> On Fri, 1 Apr 2022 21:29:56 +1100, Gary R Schmidt said:
> > > >
> > > > On 01/04/2022 21:13, Chris Wilkinson wrote:
> > > > > I built this from source and found it would not run due to a
> > > permissions
> > > > > error with the daemons bacula-* and dbcheck. It seems the make
> builds
> > > > > them with permissions 750, root:root. I run the director as
> > > > > bacula:bacula, the fd as root:root and sd as bacula:tape. User
> bacula
> > > is
> > > > > a member of the sudo group. Changing the daemons and dbcheck to 755
> > > > > fixed this.
> > > > >
> > > > > Does that suggest the make is in error or maybe my choices of what
> > > user
> > > > > to run the daemons as is incorrect?
> > > > >
> > > > NOTE: I've not built on Raspian, but it looks like you've missed the
> > > > "--with-XXX-user=" options to configure.
> > >
> > > In particular, the permissions are designed for the daemons to be
> started
> > > as
> > > root, with the -u and -g options controlling the user and group.  The
> > > default
> > > startup scripts do this using information from the configure.
> > >
> > > __Martin
> > >
> > >
> > > _______________________________________________
> > > Bacula-users mailing list
> > > Bacula-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/bacula-users
> > >
> >
>
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to