root@server1:~/backup# ftp -i -v -d username.synology.me
Connected to username.synology.me.
220 NAS FTP server ready.
ftp: setsockopt: Bad file descriptor
Name (username.synology.me:root): backup
---> USER backup
331 Password required for backup.
---> PASS XXXX
230 User backup logged in, access restrictions apply.
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> mput /root/backup/sql/*
local: /root/backup/sql/file1.sql.gz remote: /root/backup/sql/file1.sql.gz
---> PORT 76,79,79,242,183,201
No control connection for command: Success
Or if I simply use the put command (or 2 scripts I found online), I get
421 Timeout (300 seconds): closing control connection.
This also happens when using my IP address and not the DDNS. Using sftp results in this:
Of course, I've opened the right ports and tested the ftp with Cyberduck, and I can even ssh to the Synology via the Linux VPS.
In case you're wondering, I'm trying to backup the sites and databases on my VPS to my Synology NAS. When the scripts failed and I saw no one with the same problem I had, I tried just uploading something manually (sans-script) via ftp, sftp, etc. But no joy, either way.
EDIT: I changed the NAS to report PASV and added -p to the ftp command and it works now.