ftp_list.php: ncftpls requires %2F for / characters

Version 1.43

Bugfix
Finished

All ftp paths in the ftp uploads for Admin Backup/Transfers require a leading / character. ncftpls assumes that any /path/value is relative to the login path.. which may not always be true. Some ftp clients do not chroot, and /path/value may in fact mean that absolute path, when the login cwd is something totally different. A common error that would be received would be "cannot chdir to /path" As a result, we need to treat all paths as abolutes with the ncftpls script. The way it does that is uses %2F as the leading / character. The ftp_list.php now has this code added: CHAR1=`echo ${ftp_path} | awk '{print substr($1,1,1)}'` if [ "$CHAR1" = "/" ]; then new_path="/%2F`echo ${ftp_path} | awk '{print substr($1,1)}'`" ftp_path=${new_path} fi

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