Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch Centmin Mod .08 beta + pure-ftpd virtual FTP user support

Discussion in 'Beta release code' started by eva2000, Jan 19, 2015.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    10:59 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    On the same network if two Pc's try to connect one will timeout :(

    But if one use server ip and one domain they can both login and use same ftp without any issues from the same network/ip....

    Any ideas?

    Thanks

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    check pure-ftpd log or verbose connection ftp logs for clues as well as lfd log for csf firewall in /var/log/lfd.log
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    actually could be related to csf LF_DISFTP so read up at /etc/csf/csf.conf
    Code (Text):
    grep LF_DISTFTP /etc/csf/csf.conf
    # LF_SU_EMAIL_ALERT LF_CONSOLE_EMAIL_ALERT LF_DISTATTACK LF_DISTFTP
    # LF_PERMBLOCK, LF_NETBLOCK, LF_DISTATTACK, LF_DISTFTP, RT_*_ALERT
    # LF_DISTFTP in LF_DIST_INTERVAL from at least LF_DISTFTP_UNIQ IP addresses,
    LF_DISTFTP = "1"
    # LF_DISTFTP. LF_DISTFTP_UNIQ must be <= LF_DISTFTP for this to work
    LF_DISTFTP_UNIQ = "6"
    LF_DISTFTP_PERM = "1"
    # Send an email alert if LF_DISTFTP is triggered
    LF_DISTFTP_ALERT = "1"
    # If LF_DISTFTP or LF_DISTSMTP is triggered, then if the following contains the
    # LF_DISTFTP/LF_DISTSMTP
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    10:59 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    This one seems to solve all my related ftp issues for more than one users that login on ftp :)

    Don't know if it is ok to have it as default on Centminmod?

    Thanks
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    generally folks don't login multiple times from different pcs from same ip seeing as Centmin Mod LEMP stack was made for a single administration most of the time :)

    also the person who installed centmin mod would have his IP address whitelist ignored automatically by CSF Firewall, so they generally wouldn't experience this problem to begin with
     
    Last edited: Aug 30, 2016
  6. Jon Snow

    Jon Snow Active Member

    835
    170
    43
    Jun 30, 2017
    Ratings:
    +256
    Local Time:
    4:59 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Read through the entire thread but couldn't find anything helpful >.<

    @eva2000 have you ever encountered a problem with an FTP user not being able to delete/upload files and FTP outputs a permission denied error?

    It happened twice on different setups for me already. The first time it happened, it started working again after some hours but for the first couple of hours, I couldn't do anything.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    never happened for me but check the file's permissions when it happens as root user SSH in and use ls list command i.e. if file is /home/nginx/domains/domain.com/public/file.txt
    Code (Text):
    ls -lah /home/nginx/domains/domain.com/public/file.txt
    

    where you uploading to ?
     
  8. Jon Snow

    Jon Snow Active Member

    835
    170
    43
    Jun 30, 2017
    Ratings:
    +256
    Local Time:
    4:59 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Root works perfectly but the ftp account auto-generated by centminmod for the domain fails to perform its duty at times in /home/nginx/domains/domain.com/public/whatever-here

    One time I tried deleting a large library folder of an xenForo install and it just failed. After, I literally couldn't do anything with it until some hours later.

    I'll try that command the next time I encounter the problem.
     
  9. Jon Snow

    Jon Snow Active Member

    835
    170
    43
    Jun 30, 2017
    Ratings:
    +256
    Local Time:
    4:59 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    @eva2000
    Code (Text):
    ls -lah /home/nginx/domains/domain.com/public/folder/file.extension
    -rw-r--r-- 1 root nginx 2.5K Jul 14 01:02 /home/nginx/domains/domain.com/public/folder/file.extension
     
  10. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    the file is owned by root user that's why you don't have permission, if you uploaded files as root user in sftp, ensure to do outlined step 2 of getting started guide Getting Started Guide - CentminMod.com LEMP Nginx web stack for CentOS

     
  11. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  12. noly

    noly Member

    106
    16
    18
    Jul 24, 2017
    Germany
    Ratings:
    +28
    Local Time:
    9:59 AM
    1.18.x
    10.2.x
    Did id ever made it to any submenu?

    Struggeling the manual way:

    Code:
    pure-pw useradd YOURFTPUSERNAME -u nginx -g nginx -d /home/nginx/domains/YOURDOMAINVHOST
    pure-pw mkdb
    service pure-ftpd restart
    FTP Client:

    FTP with TLS/SSL (Passive mode) Port 21 ---> constantly getting "Authentication failed"
    Resetted pw, deleted and added ftpuser multiple times but had no luck. -_-

    Any idea what could be the problem?
     
  13. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    10:59 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    You may have already an ftp user set for your domain when you generated the vhost and you can check it using:

    If yes then you can just change the password if you don't remember it using:

    If not then create a new ftp user using:

    That should work :)
     
  14. noly

    noly Member

    106
    16
    18
    Jul 24, 2017
    Germany
    Ratings:
    +28
    Local Time:
    9:59 AM
    1.18.x
    10.2.x
    Don't get that sentence.:whistle:

    "and place in file the contents" ?

    Whereo_O?
     
  15. noly

    noly Member

    106
    16
    18
    Jul 24, 2017
    Germany
    Ratings:
    +28
    Local Time:
    9:59 AM
    1.18.x
    10.2.x
    Thank you @pamamolf,

    Code:
    pure-pw list 
    ...doesn't show any user since i had

    Code:
    PUREFTPD_DISABLED='y'
    in my custom_config.inc in the first place when setting up centmin.

    Today i upgraded nginx to 1.13.6 and changed the custom_config.inc entry to:

    Code:
    PUREFTPD_DISABLED='n'
    Creating the ftp-user with my previous code went fine and user was created when checking via

    Code:
    pure-pw list
    But trying to log in results constantly in "Authentication failed". -_-
     
  16. noly

    noly Member

    106
    16
    18
    Jul 24, 2017
    Germany
    Ratings:
    +28
    Local Time:
    9:59 AM
    1.18.x
    10.2.x
    Additional info:

    Just added a vhost and created a ftp user via centmin menu #2...everything works like a charme. (y)

    But not when trying to add a user to the vhost which is already configured.

    By the way.....the vhost we are talking about has an let's encrypt certificate. Does this play any role?
     
  17. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    then you need to re-enable/re-start the pure-ftpd server as it was stopped/disabled with that option see Pure-FTPD Virtual FTP Users - CentminMod.com LEMP Nginx web stack for CentOS

    re-enable/start first then run add user command

    then remove
    Code (Text):
    PUREFTPD_DISABLED='y'
     
  18. noly

    noly Member

    106
    16
    18
    Jul 24, 2017
    Germany
    Ratings:
    +28
    Local Time:
    9:59 AM
    1.18.x
    10.2.x
  19. eva2000

    eva2000 Administrator Staff Member

    54,529
    12,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,781
    Local Time:
    6:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    strange pure-ftpd yum package should provide everything

    what is output for
    Code (Text):
    rpm -ql pure-ftpd
    
     
  20. noly

    noly Member

    106
    16
    18
    Jul 24, 2017
    Germany
    Ratings:
    +28
    Local Time:
    9:59 AM
    1.18.x
    10.2.x
    Code:
    /etc/logrotate.d/pure-ftpd
    /etc/pam.d/pure-ftpd
    /etc/pam.d/pure-ftpwho
    /etc/pki/pure-ftpd
    /etc/pure-ftpd
    /etc/pure-ftpd/pure-ftpd.conf
    /etc/pure-ftpd/pureftpd-ldap.conf
    /etc/pure-ftpd/pureftpd-mysql.conf
    /etc/pure-ftpd/pureftpd-pgsql.conf
    /etc/security/console.apps/pure-ftpwho
    /etc/xinetd.d/pure-ftpd
    /usr/bin/pure-ftpwho
    /usr/bin/pure-pw
    /usr/bin/pure-pwconvert
    /usr/bin/pure-statsdecode
    /usr/lib/systemd/system/pure-ftpd.service
    /usr/sbin/pure-authd
    /usr/sbin/pure-config.pl
    /usr/sbin/pure-config.py
    /usr/sbin/pure-ftpd
    /usr/sbin/pure-ftpwho
    /usr/sbin/pure-mrtginfo
    /usr/sbin/pure-quotacheck
    /usr/sbin/pure-uploadscript
    /usr/share/doc/pure-ftpd-1.0.42
    /usr/share/doc/pure-ftpd-1.0.42/AUTHORS
    /usr/share/doc/pure-ftpd-1.0.42/CONTACT
    /usr/share/doc/pure-ftpd-1.0.42/FAQ
    /usr/share/doc/pure-ftpd-1.0.42/HISTORY
    /usr/share/doc/pure-ftpd-1.0.42/NEWS
    /usr/share/doc/pure-ftpd-1.0.42/README
    /usr/share/doc/pure-ftpd-1.0.42/README.Authentication-Modules
    /usr/share/doc/pure-ftpd-1.0.42/README.Configuration-File
    /usr/share/doc/pure-ftpd-1.0.42/README.Contrib
    /usr/share/doc/pure-ftpd-1.0.42/README.Donations
    /usr/share/doc/pure-ftpd-1.0.42/README.LDAP
    /usr/share/doc/pure-ftpd-1.0.42/README.MySQL
    /usr/share/doc/pure-ftpd-1.0.42/README.PGSQL
    /usr/share/doc/pure-ftpd-1.0.42/README.TLS
    /usr/share/doc/pure-ftpd-1.0.42/README.Virtual-Users
    /usr/share/doc/pure-ftpd-1.0.42/THANKS
    /usr/share/doc/pure-ftpd-1.0.42/pure-stat.pl
    /usr/share/doc/pure-ftpd-1.0.42/pure-vpopauth.pl
    /usr/share/doc/pure-ftpd-1.0.42/pureftpd.schema
    /usr/share/man/man8/pure-authd.8.gz
    /usr/share/man/man8/pure-ftpd.8.gz
    /usr/share/man/man8/pure-ftpwho.8.gz
    /usr/share/man/man8/pure-mrtginfo.8.gz
    /usr/share/man/man8/pure-pw.8.gz
    /usr/share/man/man8/pure-pwconvert.8.gz
    /usr/share/man/man8/pure-quotacheck.8.gz
    /usr/share/man/man8/pure-statsdecode.8.gz
    /usr/share/man/man8/pure-uploadscript.8.gz
    /var/ftp