msencrypt: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/msencrypt - from package: mapserver

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/msencrypt - from package: mapserver-bin

You may install the required package with command apt-get install {package}
Error in other languages:
msencrypt: bevel nie gevind nie
msencrypt: comandă negăsită
msencrypt: comando não encontrado
msencrypt: commande introuvable
msencrypt: command not found
msencrypt: käsku ei ole
msencrypt: không tìm thấy lệnh
msencrypt: komanda nerasta
msencrypt: Kommando nicht gefunden.
msencrypt: kommandot finns inte
msencrypt: komut yok
msencrypt: nie znaleziono polecenia
msencrypt: níor aimsíodh an t-ordú
msencrypt: no se encontró la orden
msencrypt: no s'ha trobat l'ordre
msencrypt: opdracht niet gevonden
msencrypt: parancs nem található
msencrypt: perintah tidak ditemukan
msencrypt: príkaz nenájdený
msencrypt: příkaz nenalezen
msencrypt: команда не найдена
msencrypt: командата не е открита
msencrypt: 命令找不到
msencrypt: コマンドが見つかりません