If you can't change to the directory, you probably can't list the directory or get files from the directory either. Add $ftp->message() to all the "or die" messages after the connect to get the reason for failure (on connect, $@ gives the reason). E.g.:
... or die "cannot list any DIRs " . $ftp->message();