Thread Problem mit FTP Server (22 answers)
Opened by IceRage at 2011-10-27 22:45

GwenDragon
 2011-10-28 10:06
#153621 #153621
User since
2005-01-17
14563 Artikel
Admin1
[Homepage]
user image
Geht doch:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/perl

use strict;
use warnings;

$|++;

delete @ENV{qw(ENV BASH_ENV IFS PATH)};  # make safe!

use Net::FTP;

my $url = "ftp.*****.de";

print "Hello, FTPedWorld...\n";

my $ftp = Net::FTP->new($url, Debug => 1) or die "Cannot connect to $url: $@";
$ftp->login("1234567",'****************') or die "Cannot login ", $ftp->message;

$ftp->cwd("/httpdocs");
$ftp->binary;

$ftp->pasv;
my $ret = $ftp->put(".\\test.txt");

print "PUT Not supported\n" if !$ftp->supported('PUT');

$ftp->delete("test.txt");

$ftp->quit;

1;

__DATA__

__END__


Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Hello, FTPedWorld...
Net::FTP>>> Net::FTP(2.77)
Net::FTP>>> Exporter(5.65)
Net::FTP>>> Net::Cmd(2.29)
Net::FTP>>> IO::Socket::INET(1.31)
Net::FTP>>> IO::Socket(1.31)
Net::FTP>>> IO::Handle(1.28)
Net::FTP=GLOB(0x27ffa5c)<<< 220 FTP Server [213.*.*.*]
Net::FTP=GLOB(0x27ffa5c)>>> USER 1234567
Net::FTP=GLOB(0x27ffa5c)<<< 331 Password required for 1234567
Net::FTP=GLOB(0x27ffa5c)>>> PASS ....
Net::FTP=GLOB(0x27ffa5c)<<< 230 User 1234567 logged in
Net::FTP=GLOB(0x27ffa5c)>>> CWD /httpdocs
Net::FTP=GLOB(0x27ffa5c)<<< 250 CWD command successful
Net::FTP=GLOB(0x27ffa5c)>>> TYPE I
Net::FTP=GLOB(0x27ffa5c)<<< 200 Type set to I
Net::FTP=GLOB(0x27ffa5c)>>> PASV
Net::FTP=GLOB(0x27ffa5c)<<< 227 Entering Passive Mode (213,*,*,*,137,32).
Net::FTP=GLOB(0x27ffa5c)>>> ALLO 4
Net::FTP=GLOB(0x27ffa5c)<<< 202 No storage allocation necessary
Net::FTP=GLOB(0x27ffa5c)>>> PASV
Net::FTP=GLOB(0x27ffa5c)<<< 227 Entering Passive Mode (213,*,*,*,181,252).
Net::FTP=GLOB(0x27ffa5c)>>> STOR test.txt
Net::FTP=GLOB(0x27ffa5c)<<< 150 Opening BINARY mode data connection for test.txt
Net::FTP=GLOB(0x27ffa5c)<<< 226 Transfer complete
Net::FTP=GLOB(0x27ffa5c)>>> HELP PUT
Net::FTP=GLOB(0x27ffa5c)<<< 502 Unknown command 'PUT'
PUT Not supported
Net::FTP=GLOB(0x27ffa5c)>>> DELE test.txt
Net::FTP=GLOB(0x27ffa5c)<<< 250 DELE command successful
Net::FTP=GLOB(0x27ffa5c)>>> QUIT
Net::FTP=GLOB(0x27ffa5c)<<< 221 Goodbye.


Wenn was nicht klappt, zeige doch bitte mal deinen Code und die dazugehörigen Ausgaben des Servers.
Selbst nach mehreren Pötten Kaffee komme ich nicht drauf, was du für einen vermurksten Server haben solltest, bei dem Standard-FTP nicht funktioniert.
Ich versuchte sogar dabei öfters das Protokoll HTCPCP anzuwenden, um Einblicke zu bekommen.
Last edited: 2011-10-28 10:23:25 +0200 (CEST)
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread Problem mit FTP Server