Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537286 - net-ftp/vsftpd - add support for multiple virtual servers to logrotate script
Summary: net-ftp/vsftpd - add support for multiple virtual servers to logrotate script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-01-21 20:46 UTC by tom reinertson
Modified: 2015-03-01 15:56 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to vsftpd.logrotate (file_537286.txt,257 bytes, text/plain)
2015-01-21 20:46 UTC, tom reinertson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tom reinertson 2015-01-21 20:46:17 UTC
Created attachment 394526 [details]
patch to vsftpd.logrotate

it is possible to run multiple virtual ftp servers using vsftpd.  this is accomplished by creating multiple configuration files each with a unique listen_port or listen_address and placing them into /etc/vsftpd/ with unique service names of the form "vsftpd.server-1.conf", "vsftpd.server-2.conf", etc.

the current vsftpd.init script correctly handles this situation and assumes the system administrator creates symlinks in /etc/init.d/ that link back to vsftpd, such as vsftpd.server-1 -> vsftpd and vsftpd.server-2 -> vsftpd much like net.eth0 is symlinked to net.lo.

however, vsftpd.logrotate cannot handle the multiple log files that may be created by multiple configuration files.  following the template used by the init script, the log files would reasonably be named vsftpd.server-1.log and vsftpd.server-2.log.

the current vsftpd.logrotate file contains:
/var/log/vsftpd.log {
    missingok
    notifempty
}

i believe it should contain:
/var/log/vsftpd*.log {
    missingok
    notifempty
}

in addition, since /etc/logrotate.conf already contains the "notifempty" command, i believe it can be removed from vsftpd.logrotate:
/var/log/vsftpd*.log {
    missingok
}
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2015-03-01 15:56:10 UTC
I'd rather keep notifempty since the main logrotate conf file may change in the future. I applied the rest of your patch without revbump. thanks

+  01 Mar 2015; Markos Chandras <hwoarang@gentoo.org> files/vsftpd.logrotate:
+  Amend logrotate file to handle multiple servers. Bug #537286 by tom reinertson
+