1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

FTP Failure

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by PaulJames, Jan 5, 2012.

  1. PaulJames

    PaulJames New Pleskian

    12
    60%
    Joined:
    Jan 5, 2012
    Messages:
    4
    Likes Received:
    0
    Location:
    Manchester
    Hi All,

    Apologies if this is answered elsewhere, but I have tried many solutions and I am not getting anywhere slowly!

    I am running Plesk 10 (Centos/1and1), and I am unable to connect to the server via FTP using Port 21.

    I have checked the firewall, I have FTP open, and I have added an additional entry to ensure port 21 is clear.

    Looking at the log files in var/log/messages:-
    Jan 5 11:18:51 s15751460 proftpd[25153]: 82.165.157.221 (82.165.157.221[82.165.157.221]) - FTP session opened.
    Jan 5 11:18:51 s15751460 proftpd[25153]: 82.165.157.221 (82.165.157.221[82.165.157.221]) - Preparing to chroot to directory '/var/www/vhosts/... path to directory'
    Jan 5 11:18:51 s15751460 proftpd[25153]: 82.165.157.221 (82.165.157.221[82.165.157.221]) - FTP session closed.
    Jan 5 11:18:51 s15751460 xinetd[1438]: EXIT: ftp status=0 pid=25153 duration=0(sec)

    The log file in filezilla shows (SFTP)
    Status: Connecting to 82.165.157.221...
    Response: fzSftp started
    Command: open "username@82.165.157.221" 22
    Command: Pass: **********
    Status: Connected to 82.165.157.221
    Error: Connection closed by server with exitcode 1
    Error: Could not connect to server

    Standard FTP:
    Status: Connecting to 82.165.157.221:21...
    Status: Connection established, waiting for welcome message...
    Response: 220 ProFTPD 1.3.3e Server (ProFTPD) [82.165.157.221]
    Command: USER username
    Response: 331 Password required for username
    Command: PASS **********
    Response: 230 User username logged in
    Command: SYST
    Response: 215 UNIX Type: L8
    Command: FEAT
    Response: 211-Features:
    Response: MDTM
    Response: MFMT
    Response: TVFS
    Response: UTF8
    Response: MFF modify;UNIX.group;UNIX.mode;
    Response: MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
    Response: LANG en-US*;fr-FR;it-IT;ja-JP;ko-KR;ru-RU;zh-CN;zh-TW;bg-BG
    Response: REST STREAM
    Response: SIZE
    Response: 211 End
    Command: OPTS UTF8 ON
    Response: 200 UTF8 set to on
    Status: Connected
    Status: Retrieving directory listing...
    Command: PWD
    Response: 257 "/" is the current directory
    Command: TYPE I
    Response: 200 Type set to I
    Command: PASV
    Response: 227 Entering Passive Mode (82,165,157,221,178,18).
    Command: MLSD
    Error: Connection timed out
    Error: Failed to retrieve directory listing

    I am only able to connect via FTP using SFTP and root/password.

    I have been able to connect, using port 21/Passive using "phpWebFTP" which is installed as part of one of the websites I host, which leads me to think there is a restriction somewhere preventing me from connecting.

    Any help would be greatly appreciated, as I have been struggling with this problem for several weeks, and 1and1 have been unable to help in anyway.
     
  2. Jay Versluis

    Jay Versluis Basic Pleskian

    17
    35%
    Joined:
    Nov 14, 2011
    Messages:
    99
    Likes Received:
    1
    Location:
    Miami Beach, FL
    I think I had this problem once on a 1&1 server with Plesk 9 sometime ago. It would only allow me to connect in active mode from FileZilla. The weird thing is that passive FTP used to work without problems, then one day out of a sudden it stopped. Passive FTP connections were still working from hosts other than myself though, which also leads me to believe something got blocked somewhere.

    Be interested to know what caused this.
     
  3. JairtonJ

    JairtonJ Guest

    0
     
    FTP problems after update

    Hi. I think I got the same problem.

    Two weeks ago I installed Plesk on a Amazon EC2 server.
    It is a dedicated server with a NAT redirecting my requests to the internal network.

    Did all configurations on the firewall and Proftpd so the FTP would work in passive mode.
    An it worked! =D

    But after a update on Plesk (to 10.4.4), the FTP passive doesn't list anymore.
    I wasn't the one who applied the update, so I don't know about errors, messages or prompts...

    proftpd.conf (external IP masked as 192.168.0.1 and comments removed)
    Code:
    ServerName                      "ProFTPD"
    ServerType                      inetd
    DefaultServer                   on
    
    <Global>
    DefaultRoot     ~               psacln
    AllowOverwrite          on
    </Global>
    
    DefaultTransferMode     binary
    UseFtpUsers                     on
    
    TimesGMT                        off
    SetEnv TZ :/etc/localtime
    
    Port                            21
    
    Umask                           022
    
    MaxInstances                    300
    
    ScoreboardFile /var/run/proftpd/scoreboard
    
    TransferLog /usr/local/psa/var/log/xferlog
    
    <Directory /var/www/vhosts>
            GroupOwner      psacln
    </Directory>
    
    AuthPAM on
    AuthPAMConfig proftpd
    
    IdentLookups off
    UseReverseDNS off
    
    AuthGroupFile   /etc/group
    
    PassivePorts 60000 65535
    MasqueradeAddress 192.168.0.1
    
    SystemLog    /var/log/proftpd.log
    TransferLog   /var/log/xferlog
    
    Include /etc/proftpd.include
    
    The file proftpd.include is empty.
    The internal firewall (iptables) is disabled or stoped.
    The TCP ports 60000 to 65535, 21 and 20 are opened on Amazon Security Group.

    Log of Fillezile while trying to connect using passive mode.
    Code:
    Status:	Resolving address of ftp.myhost.com
    Status:	Connecting to 192.168.0.1:21...
    Status:	Connection established, waiting for welcome message...
    Response:	220 ProFTPD 1.3.3e Server (ProFTPD) [192.168.0.1]
    Command:	USER ftpuser
    Response:	331 Password required for ftpuser
    Command:	PASS ********
    Response:	230 User ftpuser logged in
    Command:	OPTS UTF8 ON
    Response:	200 UTF8 set to on
    Status:	Connected
    Status:	Retrieving directory listing...
    Command:	PWD
    Response:	257 "/" is the current directory
    Command:	TYPE I
    Response:	200 Type set to I
    Command:	PASV
    Response:	227 Entering Passive Mode (192,168,0,1,239,184).
    Command:	MLSD
    Error:	Connection timed out
    Error:	Failed to retrieve directory listing
    
    While Fillezila was trying to list (Command: MLSD), I tried to connect to the passive port (239*256+184=61368) with telnet and got what Fillezile should receive...
    Code:
    # telnet ftp.myhost.com 61368
    modify=20120318180218;perm=fle;type=dir;unique=CA90U46C739;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; var
    modify=20120318180218;perm=flcdmpe;type=dir;unique=CA90U46C73B;UNIX.group=0;UNIX.mode=01777;UNIX.owner=0; tmp
    modify=20120318180253;perm=fle;type=dir;unique=CA90U474129;UNIX.group=504;UNIX.mode=0755;UNIX.owner=0; error_docs
    modify=20120318180305;perm=flcdmpe;type=dir;unique=CA90U474127;UNIX.group=504;UNIX.mode=0750;UNIX.owner=10044; httpsdocs
    modify=20120318180234;perm=flcdmpe;type=dir;unique=CA90U474126;UNIX.group=504;UNIX.mode=0750;UNIX.owner=10044; cgi-bin
    modify=20120318180256;perm=flcdmpe;type=dir;unique=CA90U474132;UNIX.group=0;UNIX.mode=0700;UNIX.owner=10044; private
    modify=20120318180218;perm=fle;type=dir;unique=CA90U46C73C;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; bin
    modify=20120318180220;perm=;type=dir;unique=CA90U47412E;UNIX.group=504;UNIX.mode=0750;UNIX.owner=0; conf
    modify=20120318180218;perm=fle;type=dir;unique=CA90U46C73D;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; dev
    modify=20120318180218;perm=;type=dir;unique=CA90U47412F;UNIX.group=504;UNIX.mode=0750;UNIX.owner=0; pd
    modify=20120318180232;perm=flcdmpe;type=dir;unique=CA90U474124;UNIX.group=504;UNIX.mode=0750;UNIX.owner=10044; httpdocs
    modify=20120318180218;perm=fle;type=cdir;unique=CA90U46C738;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; .
    modify=20120318180218;perm=fle;type=dir;unique=CA90U46C73E;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; lib
    modify=20120318180218;perm=fle;type=dir;unique=CA90U474130;UNIX.group=504;UNIX.mode=0755;UNIX.owner=0; web_users
    modify=20120318180218;perm=fle;type=dir;unique=CA90U46C73F;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; usr
    modify=20120318180218;perm=flcdmpe;type=dir;unique=CA90U47412A;UNIX.group=504;UNIX.mode=0750;UNIX.owner=10044; anon_ftp
    modify=20120318180218;perm=fle;type=dir;unique=CA90U474120;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; etc
    modify=20120318180221;perm=fle;type=dir;unique=CA90U474131;UNIX.group=504;UNIX.mode=0755;UNIX.owner=0; subdomains
    modify=20120318180218;perm=fle;type=pdir;unique=CA90U46C738;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; ..
    modify=20120318180218;perm=fle;type=dir;unique=CA90U474133;UNIX.group=504;UNIX.mode=0550;UNIX.owner=10044; statistics
    modify=20120318180218;perm=fle;type=dir;unique=CA90U474121;UNIX.group=0;UNIX.mode=0755;UNIX.owner=0; lib64
    
    Connection lost.
    
    Well... I don't know what else to do...
    Any help would be appreciated.
     
  4. JairtonJ

    JairtonJ Guest

    0
     
    Hi again...

    I found a new clue... and possible solution...

    Changing the MasqueradeAddress in proftpd.conf from
    Code:
    MasqueradeAddress 192.168.0.1
    to
    Code:
    MasqueradeAddress ftp.myhost.com
    Worked! =D

    I was able to access the FTP server in passive mode for any domain configured on Plesk.
    (Not only for ftp.myhost.com).

    So here's my last doubt... WHY?!

    Is there some kind of Named Virtual Server on Proftpd used by Plesk...?
    When I try to connect in passive mode, does my client try do list files using the IP given by MasqueradeAddress...?
    I couldn't find any domain specific config or any virtual server...
     
  5. jimbob123

    jimbob123 New Pleskian

    13
    35%
    Joined:
    Mar 13, 2012
    Messages:
    13
    Likes Received:
    0
    I found the issue to be that I'd denied all for 'IPv6 Neighbor Discovery'. Once I allowed connections on that then I could connect via FTP again.

    Also when I couldn't connect with FTP I could connect with SFTP which is much better to use anyway - so if you can switch over do that instead.
     
Loading...