Articles in this section

FTP connection is randomly dropped during file transfer on Plesk for Linux server with SELinux

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • FTP connection is randomly dropped during file transfer on Plesk server.
  • Errors in FileZilla client log:

    CONFIG_TEXT: 8000 3 Command: PORT 127,0,0,1,243,14
    8000 3 Response: 500 Illegal PORT command

  • Following entries can be found in /var/log/secure:

    CONFIG_TEXT: proftpd: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: Permission Denied
    proftpd: pam_systemd(proftpd:session): Failed to connect to system bus: Permission Denied

  • One of the following errors appear in /var/log/messages :

    CONFIG_TEXT: proftpd[3013]: 0.0.0.0 (203.0.113.2[203.0.113.2]) - Refused PORT 127,0,0,1,243,36 (address mismatch)
    proftpd[3013]: 0.0.0.0 (203.0.113.2[203.0.113.2]) - Refused PORT 127,0,0,1,243,38 (address mismatch)


    CONFIG_TEXT: linuxweb proftpd[95390]: 0.0.0.0 (203.0.113.2[203.0.113.2]) - error initializing connection: Permission denied
    linuxweb proftpd[95390]: 0.0.0.0 (203.0.113.2[203.0.113.2]) - FTP session closed.


    CONFIG_TEXT: proftpd[17591]: 0.0.0.0. (203.0.113.2[203.0.113.2]) - error initializing connection: Permission denied

Cause

SELinux prohibits using passive ports for FTP connection.

Resolution

  1. Connect to the server using SSH.

  2. Configure SELinux to allow passive ports during FTP connection:

    # setsebool -P ftpd_use_passive_mode 1

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.