ftp_list.php ftps required double leading forward slash

Version 1.51

Bugfix
Finished

When backing up to ftp with ftps, this uses curl. The ftp you specify might be / or /admin_backups/, for example. Previously, this would have been given to curl like: /usr/local/bin/curl --config /home/tmp/1828.cfg --ftp-ssl -k --silent --show-error --list-only ftp://1.2.3.4:21/admin_backups/ But this actually wasn't correct, because the first slash is just a separator, making the ftp path just: admin_backups/ which is just relative to the login. Because some ftp accounts are not chrooted, this might not be correct if they pass the ftp_path: /home/user/admin_backups/ because if the default login path is /home/user, then curl would be trying to cd to: /home/user/home/user/admin_backups/ which would not be correct. The solution is to add a 2nd leading slash for curl in the script, so it looks like: /usr/local/bin/curl --config /home/tmp/1828.cfg --ftp-ssl -k --silent --show-error --list-only ftp://1.2.3.4:21//admin_backups/

Interested to try DirectAdmin? Get a 30-day Free Trial!