Description of problem: Installing clamd and configuring the service using the examples provided, the '/usr/share/doc/clamd/clamd.logrotate' file tries to HUP the 'clamd.<SERVICE>' process. Following the examples, the SERVICE name is 'scan'. However, the process 'clamd.scan' does not exist, the process is '/usr/sbin/clamd' with the '-c' option pointing to the '/etc/clamd.d/scan.conf' config file. (As seen in the '/usr/lib/systemd/system/clamd@.service' file.) Version-Release number of selected component (if applicable): clamd-0.100.1-1.fc28.x86_64 How reproducible: Every time when using supplied instructions/files. Steps to Reproduce: 1. Follow the instructions for setting up a clamd systemd service using the config file 'scan.conf' in '/etc/clamd.d', and the files in '/usr/share/doc/clamd'. Include the LogFile config option so that we can see the HUP result, and set the LogFileMaxSize option to zero. 2. As root run the command found in the '/etc/logrotate.d/clamd' file (or '/etc/logrotate.d/clamd.logrotate' if you copied the file exactly): killall -HUP clamd.scan 3. Check the log file to see if the HUP worked. Actual results: Stderr for the killall command shows 'clamd.scan: no process found' The log file shows nothing about the HUP. Expected results: The killall command should not show any errors (no output at all). The log file should show (for example): Wed Aug 1 10:51:01 2018 -> SIGHUP caught: re-opening log file. Additional info: The 'clamd.logrotate' example file should just use the command 'killall -HUP clamd' - without the SERVICE name. However, perhaps what would be better would be to use something like 'pkill -u <USER> -HUP clamd'. This would then only HUP the clamd process of the USER username. This problem has possibly not been noticed because the logfile option is disabled by default. Also the logrotate file redirects all killall output to /dev/null, and runs ':' if there is an error from killall. This basically does nothing, so the user sees no postrotate error. At worst someone may notice that the log file is not being rotated. My only concern here is that if more than one 'SERVICE' is created - using differing config options presumably - then the killall/pkill command would HUP them all, perhaps more than once if the logrotate included a postrotate section for each log file. Perhaps the 'pkill' command could be changed to specify: pkill -u <USER> -HUP -f '/usr/sbin/clamd -c /etc/clamd.d/<SERVICE>.conf'
Hello , sorry for delay , thinking about this ticket and `systemctl restart clamd` usually don't have log file lof is wrote on journalctl and /var/log/messages . second I don't need change /usr/lib/systemd/system/clamd\@scan.service or setup clamd.scan , just edit /etc/clamd.d/scan.conf but if you want set LogFile /var/log/clamd.scan and `killall -HUP clamd` should work or yes `pkill -u <USER> -HUP -f '/usr/sbin/clamd -c /etc/clamd.d/<SERVICE>.conf' ` Ok I modified the clamd.logrotate file as suggested [1] [1] https://src.fedoraproject.org/rpms/clamav/c/8a56d4c9abdf9c924a9fc931ba5a8da485296eec?branch=master
clamav-0.100.2-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-847fe2ed61
clamav-0.100.2-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-847fe2ed61
clamav-0.100.2-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-b6e8b488d2
clamav-0.100.2-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-b6e8b488d2
clamav-0.100.2-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
clamav-0.100.2-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.