diff --git a/Makefile.in b/Makefile.in index e03675ec942..9c871709450 100755 --- a/Makefile.in +++ b/Makefile.in @@ -4,6 +4,7 @@ @MCOMMON@ working_dir = @working_dir@ +log_dir = @logdir@ dir_group = @dir_group@ dir_user = @dir_user@ @@ -102,6 +103,10 @@ installdirs: $(MKDIR) $(DESTDIR)$(working_dir); \ chmod 770 $(DESTDIR)$(working_dir); \ fi + + $(MKDIR) $(DESTDIR)$(log_dir); + chmod 775 $(DESTDIR)$(log_dir); + -if test "x$(dir_user)" != "x" ; then \ chown $(dir_user) $(DESTDIR)$(working_dir); \ fi diff --git a/platforms/rpms/bareos.spec b/platforms/rpms/bareos.spec index 7ce1e13ddbf..ec83804d869 100644 --- a/platforms/rpms/bareos.spec +++ b/platforms/rpms/bareos.spec @@ -433,7 +433,7 @@ export MTX=/usr/sbin/mtx --with-plugindir=%{plugin_dir} \ --with-pid-dir=%{pid_dir} \ --with-bsrdir=%{bsr_dir} \ - --with-logdir=%{_logdir}/bareos \ + --with-logdir=/var/log/bareos \ --with-subsys-dir=%{_subsysdir} \ --enable-smartalloc \ --disable-conio \ @@ -666,6 +666,7 @@ echo "This is a meta package to install a full bareos system" > %{buildroot}%{_d %if 0%{?systemd_support} %{_unitdir}/bareos-sd.service %endif +%attr(0775, %{storage_daemon_user}, %{daemon_group}) %dir /var/lib/bareos/storage %files filedaemon # fd package (bareos-fd, plugins) @@ -700,6 +701,7 @@ echo "This is a meta package to install a full bareos system" > %{buildroot}%{_d %{_libdir}/libbareosfind.so %{_libdir}/libbareosndmp-%{_libversion}.so %{_libdir}/libbareosndmp.so +%attr(0775, %{daemon_user}, %{daemon_group}) %dir /var/log/bareos # # Generic stuff needed for all software so stuffed into libs package