From 194541339261c36664af72214ac8c34a03781813 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 10 Jan 2019 10:31:19 +0000 Subject: [PATCH] - put logs in /var/log/proftpd, added logrotate --- proftpd-mod_tls.conf | 2 +- proftpd.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/proftpd-mod_tls.conf b/proftpd-mod_tls.conf index c7b6626..99fe1c4 100644 --- a/proftpd-mod_tls.conf +++ b/proftpd-mod_tls.conf @@ -4,7 +4,7 @@ LoadModule mod_tls.c TLSEngine on # Specify TLS/SSL log -TLSLog /var/log/ftp.tls.log +TLSLog /var/log/proftpd/tls.log # Path to CA chain file TLSCACertificateFile /etc/ftpd/chain.pem diff --git a/proftpd.spec b/proftpd.spec index 2c5b423..4f4e60b 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -44,6 +44,7 @@ Source9: %{name}-mod_pam.conf Source10: %{name}-mod_tls.conf Source11: %{name}-anonftp.conf Source12: %{name}-mod_clamav.conf +Source13: %{name}.logrotate Patch0: %{name}-paths.patch Patch1: %{name}-noautopriv.patch URL: http://www.proftpd.org/ @@ -497,8 +498,8 @@ MODARG=$(echo $MODULES | tr ' ' '\n' | sort -u | xargs | tr ' ' ':') %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc/{pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \ - $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log,run/proftpd} \ +install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \ + $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log/{archive,}/proftpd,run/proftpd} \ $RPM_BUILD_ROOT%{_sysconfdir}/conf.d \ $RPM_BUILD_ROOT%{_includedir}/%{name} @@ -509,6 +510,7 @@ install -d $RPM_BUILD_ROOT/etc/{pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \ rm $RPM_BUILD_ROOT%{_sbindir}/in.proftpd +install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/proftpd install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir} install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/mod_auth_pam.conf MODULES=" @@ -647,6 +649,7 @@ fi %doc README.md README.capabilities README.classes README.controls README.IPv6 %doc README.modules %doc doc/*.html doc/contrib doc/howto doc/modules +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/proftpd %dir %attr(750,root,ftp) %dir %{_sysconfdir} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers @@ -655,7 +658,8 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_auth_file.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_ident.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_clamav.conf -#%attr(640,root,root) %ghost /var/log/* +%attr(750,root,root) %dir /var/log/proftpd +%attr(750,root,root) %dir /var/log/archive/proftpd %attr(755,root,root) %{_bindir}/* %attr(755,root,root) %{_sbindir}/* %dir %{_libexecdir} -- 2.46.0