{"id":2200,"date":"2021-09-23T09:41:34","date_gmt":"2021-09-23T09:41:34","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=2200"},"modified":"2021-09-23T09:41:34","modified_gmt":"2021-09-23T09:41:34","slug":"how-to-scan-ftp-uploaded-files-on-cpanel-servers","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/","title":{"rendered":"How to scan FTP uploaded files on cPanel Servers"},"content":{"rendered":"<p>This article will assist you to scan virus uploaded via FTP to create certain all files are virus free:<\/p>\n<p>First let\u2019s install ClamAV, it&#8217;s been now been enclosed in Cpanel\/WHM. Clam AntiVirus (ClamAV) may be a free and open-source, cross-platform antivirus software tool-kit able to observe many type of malicious software , as well as viruses. One among its main uses is on mail servers as a server-side email virus scanner.<\/p>\n<p>As root You can also install it from your WHM interface, for these follow as given below:<\/p>\n<p><strong>Step 1:<\/strong>\u00a0Click on<strong>\u00a0\u2018cPanel\u2019<\/strong>\u00a0in \u2018<strong>WHM\u2019<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2201\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-1-300x153.png\" alt=\"clamAV-1\" width=\"907\" height=\"462\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-1-300x153.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-1-768x391.png 768w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-1.png 907w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/p>\n<p><strong>Step 2:<\/strong>\u00a0Click on \u2018<strong>Manage Plugins\u2019<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2202\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-2-300x66.png\" alt=\"clamAV-2\" width=\"1024\" height=\"225\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-2-300x66.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-2-768x169.png 768w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-2.png 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><strong>Step 3:<\/strong>\u00a0Now Click on<strong>\u00a0\u2018clamavconnector\u2019<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2203\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-3-300x73.png\" alt=\"clamAV-3\" width=\"1024\" height=\"248\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-3-300x73.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-3-768x186.png 768w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-3.png 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Check the \u201c<strong>Install and Keep Updated<\/strong>\u201d and then click at the bottom of the page to save.<\/p>\n<p>After the successful installation edit the file\u00a0<strong>\/etc\/pure-ftpd.conf<\/strong>\u00a0and change this line to\u00a0<strong>CallUploadScript yes<\/strong><\/p>\n<p>Next create file \/etc\/pure-ftpd<strong>\/clamav_check.sh with this content:<\/strong><\/p>\n<pre>#!\/bin\/bash\r\n#Maximum file size to scan in bytes that's set to 10MB\r\nMAXSIZE=10485760\r\nif [ \"$UPLOAD_SIZE\" -le \"$MAXSIZE\" ]; then\r\n\/usr\/bin\/clamdscan --remove --quiet --no-summary \"$1\"\r\nfi<\/pre>\n<article id=\"post-3637\" class=\"post-3637 post type-post status-publish format-standard hentry category-tutorials tag-cpanel-servers tag-virus-scan ast-article-single\">\n<div class=\"ast-post-format- ast-no-thumb single-layout-1\">\n<div class=\"entry-content clear\">\n<p><strong>Change its permissions and make it executable:<\/strong><\/p>\n<pre> chmod 755 \/etc\/pure-ftpd\/clamav_check.sh<\/pre>\n<p><strong>Now we should start the pure-uploadscript daemon every time to call our script when a file is uploaded<\/strong><\/p>\n<pre> \/usr\/sbin\/pure-uploadscript -B -r \/etc\/pure-ftpd\/clamav_check.sh<\/pre>\n<p><strong>And to let it start with your server\/vps reboots just run this :<\/strong><\/p>\n<pre>echo \u201c\/usr\/sbin\/pure-uploadscript -B -r \/etc\/pure-ftpd\/clamav_check.sh\u201d &gt;&gt; \/etc\/rc.d\/rc.local<\/pre>\n<p><strong>Now restart pure-ftpd:<\/strong><\/p>\n<pre>service pure-ftpd restart<\/pre>\n<p>Now all your uploaded files which are less than 10MB in size will be scanned, adjust this size limit per your needs.<\/p>\n<\/div>\n<\/div>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>This article will assist you to scan virus uploaded via FTP to create certain all files are virus free: First let\u2019s install ClamAV, it&#8217;s been now been enclosed in Cpanel\/WHM. Clam AntiVirus (ClamAV) may be a free and open-source, cross-platform antivirus software tool-kit able to observe many type of malicious software , as well as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-2200","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to scan FTP uploaded files on cPanel Servers - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to scan FTP uploaded files on cPanel Servers - OWS KB\" \/>\n<meta property=\"og:description\" content=\"This article will assist you to scan virus uploaded via FTP to create certain all files are virus free: First let\u2019s install ClamAV, it&#8217;s been now been enclosed in Cpanel\/WHM. Clam AntiVirus (ClamAV) may be a free and open-source, cross-platform antivirus software tool-kit able to observe many type of malicious software , as well as [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-23T09:41:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-1-300x153.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/clamAV-1.png\",\"width\":907,\"height\":462,\"caption\":\"clamAV-1\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/\",\"name\":\"How to scan FTP uploaded files on cPanel Servers - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/#primaryimage\"},\"datePublished\":\"2021-09-23T09:41:34+00:00\",\"dateModified\":\"2021-09-23T09:41:34+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-scan-ftp-uploaded-files-on-cpanel-servers\/\",\"name\":\"How to scan FTP uploaded files on cPanel Servers\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=2200"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2200\/revisions"}],"predecessor-version":[{"id":2204,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2200\/revisions\/2204"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=2200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=2200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=2200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}