我在assustor服务器上有ftp,我尝试使用shell脚本连接到ftp,但总是有错误:

这是我的脚本:

#!/bin/bash
ftp -inv $HOST << EOF
user $USER_NM $PWS
lcd $PATH
mget *.*
bye
EOF

我在linux Centos上运行这个脚本 .

这是我的命令:

sh ftp_getfiles.sh

这就是我在运行脚本时得到的

**220 ProFTPD 1.3.4a Server (ProFTPD) [::ffff:192.168.1.7]
Remote system type is UNIX.
Using binary mode to transfer files.
331 Password required for disti1
530 Login incorrect.
Login failed.
: No such file or directorydistifiles
Please login with USER and PASS
Passive mode refused.
?Invalid command
221 Goodbye.**