That sounds like a bug. The Makefile actually contains comments about this,
so someone was thinking about it:
# Allow non-root execution of bsmtp for non-root Directors
install: $(INSTOOLS)
@for tool in ${INSTOOLS} ; do \
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $$tool
$(DESTDIR)$(sbindir)/$$tool ; \
done
# chattr +i $(DESTDIR)$(sbindir)/bsmtp
# chmod 755 $(DESTDIR)$(sbindir)/bsmtp
__Martin
>>>>> On Tue, 12 Apr 2022 10:10:38 +0100, Chris Wilkinson said:
>
> Just a final note on this. I found that bsmtp was installed with root:root
> 750 permissions. The effect of this was that emails were not sent,
> presumably because dir runs as user bacula. There were no errors shown or
> logged in any of the logs so it was tricky to track down. Once I changed
> bsmtp to 755, mail began to work.
>
> The other bacula utility programs are also installed as root:root, 750.
>
> Regards
> Chris Wilkinson
>
> On Sat, 2 Apr 2022, 8:49 am Chris Wilkinson, <[email protected]> wrote:
>
> > 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, <[email protected]> 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, <[email protected]>
> >> 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
> >> > > [email protected]
> >> > > https://lists.sourceforge.net/lists/listinfo/bacula-users
> >> > >
> >> >
> >>
> >
>
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users