Total de visualizações de página

sábado, 23 de abril de 2016

Pure-FTPd + Clamav


Pure-FTPd + Clamav
2014/09/30
 
Configure Pure-FTPd + Clamav to scan virus timely via FTP connection.
[1]
[2]Configure Pure-FTPd.
[root@www ~]# 
vi /etc/pure-ftpd/pure-ftpd.conf
# line 368: uncomment

CallUploadScript   yes
[root@www ~]# 
vi /etc/pure-ftpd/clamscan.sh
# create new

#!/bin/bash

/usr/bin/clamscan --remove --quiet --no-summary "$1"

[root@www ~]# 
chmod 755 /etc/pure-ftpd/clamscan.sh
[root@www ~]# 
vi /etc/systemd/system/clamav.pure-ftpd.service
# create new

[Unit]
Description=Clamav Scanning Service for Pure-FTPd
Before=pure-ftpd.service

[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/sbin/pure-uploadscript -B -r /etc/pure-ftpd/clamscan.sh

[Install]
WantedBy=multi-user.target

[root@www ~]# 
systemctl --system daemon-reload 

[root@www ~]# 
systemctl start clamav.pure-ftpd 

[root@www ~]# 
systemctl enable clamav.pure-ftpd 

ln -s '/etc/systemd/system/clamav.pure-ftpd.service' '/etc/systemd/system/multi-user.target.wants/clamav.pure-ftpd.service'
[3]
Upload a test virus to the server via FTP to make sure the setting works normally. Virus will be uploaded but it will be removed immediately.

Nenhum comentário:

Postar um comentário