maldet command not found. Install Maldet on Linux

maldet command not found. Install Maldet on Linux

I got Maldet command not found error while trying to scan my CentOS 7 server.

ERROR:

-bash: /usr/local/sbin/maldet: No such file or directory.

-bash: maldet command not found
 

root@server [/]# maldet -a /home/user/public_html/
-bash: maldet: command not found

root@server [/]# maldet -a /home/user/public_html/
-bash: /usr/local/sbin/maldet: No such file or directory


 
Linux Malware Detect (maldet) is used on linux servers to scan and remove / quarantine infected files.

LMD (Linux Malware Detect) might not be installed on the above server.

Missing Maldet directories and files on your server might be another reason.

To fix this error you must download and install Maldet on your server.
 

Maldet installation steps

1. Log into your CentOS / Redhat 7 server as root user

2. You can download maldet installation tar file from rfxn.com website

3. Extract the installation file using tar command

4. Run the installation script ‘sh install.sh’
 

# cd /usr/local/src/

# wget http://www.rfxn.com/downloads/maldetect-current.tar.gz

# tar -xzvf maldetect-current.tar.gz

# cd maldetect-*

sh install.sh


 


root@server [/]# cd /usr/local/src/

root@server [/usr/local/src]# wget http://www.rfxn.com/downloads/maldetect-current.tar.gz

--2016-04-30 02:46:53-- http://www.rfxn.com/downloads/maldetect-current.tar.gz
Resolving www.rfxn.com (www.rfxn.com)... 129.121.132.46
Connecting to www.rfxn.com (www.rfxn.com)|129.121.132.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1135369 (1.1M) [application/x-gzip]
Saving to: 'maldetect-current.tar.gz'

100%[==============================================================================================================================>] 1,135,369 5.20MB/s in 0.2s

2016-04-30 02:46:53 (5.20 MB/s) - 'maldetect-current.tar.gz' saved [1135369/1135369]

 

root@server [/usr/local/src]# tar -xzvf maldetect-current.tar.gz

maldetect-1.5/
maldetect-1.5/CHANGELOG
maldetect-1.5/cron.daily
maldetect-1.5/CHANGELOG.VARIABLES
maldetect-1.5/README
maldetect-1.5/files/
maldetect-1.5/files/uninstall.sh
maldetect-1.5/files/hookscan.sh
maldetect-1.5/files/ignore_file_ext
maldetect-1.5/files/sigs/
maldetect-1.5/files/sigs/md5v2.dat
maldetect-1.5/files/sigs/rfxn.ndb
maldetect-1.5/files/sigs/appver/
maldetect-1.5/files/sigs/appver/wordpress.ver
maldetect-1.5/files/sigs/md5.dat
maldetect-1.5/files/sigs/hex.dat
maldetect-1.5/files/sigs/maldet.sigs.ver
maldetect-1.5/files/sigs/rfxn.hdb
maldetect-1.5/files/internals/
maldetect-1.5/files/internals/functions
maldetect-1.5/files/internals/hexstring.pl
maldetect-1.5/files/internals/tlog
maldetect-1.5/files/internals/scan.etpl
maldetect-1.5/files/internals/internals.conf
maldetect-1.5/files/internals/hexfifo.pl
maldetect-1.5/files/VERSION.hash
maldetect-1.5/files/ignore_inotify
maldetect-1.5/files/maldet
maldetect-1.5/files/conf.maldet
maldetect-1.5/files/clean/
maldetect-1.5/files/clean/js.inject.VisitorTracker
maldetect-1.5/files/clean/gzbase64.inject.unclassed
maldetect-1.5/files/clean/base64.inject.unclassed
maldetect-1.5/files/clean/php.brute.bf1lic
maldetect-1.5/files/service/
maldetect-1.5/files/service/maldet.sysconfig
maldetect-1.5/files/service/maldet.sh
maldetect-1.5/files/service/maldet.service
maldetect-1.5/files/sess/
maldetect-1.5/files/monitor_paths
maldetect-1.5/files/ignore_paths
maldetect-1.5/files/ignore_sigs
maldetect-1.5/files/modsec.sh
maldetect-1.5/cron.d.pub
maldetect-1.5/COPYING.GPL
maldetect-1.5/CHANGELOG.RELEASE
maldetect-1.5/.ca.def
maldetect-1.5/install.sh

 

root@server [/usr/local/src]# cd maldetect-*

root@server [/usr/local/src/maldetect-1.5]# sh install.sh

Created symlink from /etc/systemd/system/multi-user.target.wants/maldet.service to /usr/lib/systemd/system/maldet.service.

Linux Malware Detect v1.5
(C) 2002-2015, R-fx Networks (C) 2015, Ryan MacDonald

This program may be freely redistributed under the terms of the GNU GPL

installation completed to /usr/local/maldetect

config file: /usr/local/maldetect/conf.maldet

exec file: /usr/local/maldetect/maldet

exec link: /usr/local/sbin/maldet

exec link: /usr/local/sbin/lmd

cron.daily: /etc/cron.daily/maldet

maldet(19519): {sigup} performing signature update check...

maldet(19519): {sigup} local signature set is version 2016040521114
maldet(19519): {sigup} latest signature set already installed

root@server [/usr/local/src/maldetect-1.5]#

 

How to run Maldet scan on your CentOS / Redhat Server

1. Log into your Linux server as ‘root’ user

2. Run the below command to initiate a scan

# maldet -a /directory-path

OR

# maldet –scan-all /path-of-directory