Pureftpd cannot login, authentication error

Discussion in 'Server Operation' started by janvl, Oct 26, 2022.

  1. janvl

    janvl Member

    on a Server with Ubuntu 18.05 i installed Pureftpd.
    It is working in a sense that the process is there, "systemctl status pureftpd" shows it is running and there are no errors.
    I opend up the ports (22 and 35000-50000) in ufw.
    I have created 2 users where i took care the password does not contain any problematical characters that might need escaping.
    After creation/changes i ran "pure-pw mkdb".
    I installed it without Mysql.

    I still get "Error Autentication faild".

    The directory i created is in the home-directory and the permission set are for the ftp-user.

    Has anyone an idea what i am overlooking? I installed PureFTPd on two ISPConfig servers without problems.
    This is a server with BigBlueButton, no other software.

  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    That is not the port for FTP.

    And what is this for?
    Last edited: Oct 27, 2022
  3. janvl

    janvl Member

    Thank you Ahrasis,
    when using SFTP the port is 22 - plain FTP is 21 - i know.
    As i wrote: "This is a server with BigBlueButton, no other software.".

    Since i have PureFTPd on my ISPConfig server i thought to install this on the bare-metal-server with BBB too.

  4. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    port 22 is for ssh access. sftp uses the ssh protocol not ftp. it's handled by the ssh daemon, not the ftp daemon.
    sftp uses port 22 only. you don't need to open the passive ftp ports for it.
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Basically, ftp or ftps (port 21) is dfferent from sftp or ssh (port 22), so you don't check whether ssh is working via pure-ftpd. Both however still need to be created in ISPConfig admin panel if you are using ISPConfig.
  6. janvl

    janvl Member

    this server has no ispconfig.
    It is a dedicated server specifically for BigBlueButton videoconferencing.
    I just want to install PureFTPd on it so i can get access to a directory on this server with SFTP.
    After that a connection will be made with a dedicated Nextcloud-server.

    PureFTPd is installed, the service started, systemctrl status does not show any errors the service is active.

    I just cannot connect because i get an Authentification error, whatever user/password i define.
    So i oversee something. I have set PureFTPd not to use pam, so it should only use it's own database.

    Can it work without Mysql? I did not install a connection to Mysql.

  7. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    has as already been stated multiple times. you are not going to get sftp access using pure-ftpd
    sftp uses SSH. ssh uses port 22. pure-ftpd does not listen to port 22. ever.
  8. janvl

    janvl Member

    Thanks nhybgtvfr
    exactly that is what i oversaw. I now get a connection with port 21 and TLS - although i now get a timeout at MLSD.
    I guess the defined directory is wrong.

  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Sorry. I misread.

    Anyway, to use sftp or ssh you simply need to create user for it.
  10. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    MLSD, that's trying to get a directory listing.. usually the first thing it's doing on the data connection. that normally ends up being a problem with the masquerade ip (ForcePassiveIP) or the passive ports (PassivePortRange) configuration, either in the pure-ftpd configuration or the firewalls. although i guess it could be wrong / unauthorized directories.. never had that problem myself, so don't know what error that will throw.
  11. till

    till Super Moderator Staff Member ISPConfig Developer

  12. janvl

    janvl Member

    in the userconfig is a line that says:
    Directory: /home/mydirectory/ ./
    i guess the ./ must be deleted but i will look if i find something in internet with a search-engine.
    That must be trivial.
  13. janvl

    janvl Member

    Thanks Till,

    with the Link you send me i did
    echo "35000 50000" > /etc/pure-ftpd/conf/PassivePortRange
    restarted and now it is working

    Thanks to all fo you getting this to work!


Share This Page