Learn about Centmin Mod LEMP Stack today
Become a Member

How to create FTP account for an domain?

Discussion in 'Other Centmin Mod Installed software' started by HarryPotter, May 23, 2016.

Tags:
  1. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    I have try create an FTP account for domain but i cannot login via FileZilla. Also I have try to login via WordPress module still not work.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    centmin.sh menu option 2 and option 22 generated site domain nginx vhost already auto creates the pure-ftpd virtual ftpd user account.
    • Did you let the script generate a password for you or set your own ?
    • Did you make sure to enable explicit TLS/SSL mode and enable PASV passive mode like in 1st post here.
    • Which FTP client ? As not all FTP clients support FTP explicit TLS/SSL mode only clients listed at bottom of this post.
    From 1st post here, try the pure-pw commands to display pure-ftpd user details and change the user password. Also pure-pw manual is here and http://download.pureftpd.org/pub/pure-ftpd/doc/README.Virtual-Users

    list all pure-ftpd created virtual FTP users
    Code:
    pure-pw list
    Code:
    pure-pw list
    ftpuser /usr/local/nginx/html/./ 
    ftpuser2 /usr/local/nginx/html/./ 
    ftpuser3 /usr/local/nginx/html/./ 
    ftpuser4 /home/nginx/domains/domain1.com/./ 
    ftpuser6 /home/nginx/domains/sub.domain1.com/./ 
    ftpuser5 /home/nginx/domains/domain2.com/./
    to delete virtual FTP user
    Code:
    pure-pw userdel FTPUSERNAME
    pure-pw mkdb
    change virtual FTP user's password
    Code:
    pure-pw passwd FTPUSERNAME
    pure-pw mkdb
    show full details for an specific pure-ftpd virtual FTP user
    Code:
    pure-pw show FTPUSERNAME
    password is encrypted

    Code:
    pure-pw show ftpuser5
    
    Login : ftpuser5
    Password : $1$msgfvdN0$51dhLdPGiCQpQEwtZ30kF1
    UID : 500 (nginx)
    GID : 500 (nginx)
    Directory : /home/nginx/domains/domain2.com/./
    Full name :
    Download bandwidth : 0 Kb (unlimited)
    Upload bandwidth : 0 Kb (unlimited)
    Max files : 0 (unlimited)
    Max size : 0 Mb (unlimited)
    Ratio : 0:0 (unlimited:unlimited)
    Allowed local IPs :
    Denied local IPs :
    Allowed client IPs :
    Denied client IPs :
    Time restrictions : 0000-0000 (unlimited)
    Max sim sessions : 0 (unlimited)
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
  4. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    Absolute not working.
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
  6. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    I have read that. But when try login it is throw login authentication failed. Try many times then my IP being blocked.
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    try to change virtual FTP user's password
    Code (Text):
    pure-pw passwd FTPUSERNAME
    pure-pw mkdb
     
  8. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    Logged in. But failed to retriving directories.

    Look this message.
    Code:
    Status:         TLS connection established.
    Status:         Logged in
    Status:         Retrieving directory listing...
    Command:    PWD
    Response:     257 "/" is your current location
    Command:    TYPE I
    Response:     200 TYPE is now 8-bit binary
    Command:    PASV
    Response:     227 Entering Passive Mode (****)
    Command:    MLSD
    Error:           Connection timed out after 20 seconds of inactivity
    Error:           Failed to retrieve directory listing
    Status:         Disconnected from server
    Status:         Connecting to ****:21...
    Status:         Connection established, waiting for welcome message...
    Status:         Initializing TLS...
    Status:         Verifying certificate...
    Status:         TLS connection established.
    Status:         Logged in
    Status:         Retrieving directory listing...
    Command:    PWD
    Response:     257 "/" is your current location
    Command:    TYPE I
    Response:     200 TYPE is now 8-bit binary
    Command:    PASV
    Response:     227 Entering Passive Mode (****)
    Command:    MLSD
    Error:           Connection timed out after 20 seconds of inactivity
    Error:           Failed to retrieve directory listing
    
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
  10. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    I sure that i do it right way.
     
  11. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    double check by trying to use winscp to connect and post screenshot of filezilla passive mode enabled and FTP over TLS just for a 2nd set of eyes on it

    to clarify, did you create a new pure-ftpd user account or trying to use the one that centmin.sh menu option 2/22 created for you ?
     
  12. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    I have on MAC so no Winscp available yet.

    It is auto create for me.
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    ok.. tested myself and seems to work for me and can connect fine and transfer settings set passive mode with Host = your server ip

    Filezilla settings

    upload_2016-5-24_15-24-16.png

    upload_2016-5-24_15-31-22.png

    upload_2016-5-24_15-30-58.png

    what's output for these 2 commands where USERNAME is the pure-ftpd virtual FTP username and /home/nginx/domains/domain1.com where domain1.com is your domain listed
    Code (Text):
    pure-pw list
    pure-pw show USERNAME
    ls -lahgR /home/nginx/domains/domain1.com
    

    example
    Code (Text):
     pure-pw list
    user1               /home/nginx/domains/domain1.com/./                      
    

    Password listed is shown encrypted so not the actual password
    Code (Text):
    pure-pw show user1
    
    Login              : user1
    Password           : $6$Q5lI1poh5aeEIDz0$GfbOwVYB5/sagwRAVo2L21rEb4qME0BKiPRtckJ/m4mdmPqA1kpuCjp2syH56Yvn2/DQy.lH4bVgOpAD6Ff8Y0
    UID                : 1000 (nginx)
    GID                : 1000 (nginx)
    Directory          : /home/nginx/domains/domain1.com/./
    Full name          :
    Download bandwidth : 0 Kb (unlimited)
    Upload   bandwidth : 0 Kb (unlimited)
    Max files          : 0 (unlimited)
    Max size           : 0 Mb (unlimited)
    Ratio              : 0:0 (unlimited:unlimited)
    Allowed local  IPs :
    Denied  local  IPs :
    Allowed client IPs :
    Denied  client IPs :
    Time restrictions  : 0000-0000 (unlimited)
    Max sim sessions   : 0 (unlimited)

    Code (Text):
    ls -lahgR /home/nginx/domains/domain1.com
    /home/nginx/domains/domain1.com:
    total 4.0K
    drwxr-s--- 6 nginx   56 May 24 05:14 .
    drwxr-s--- 4 nginx   45 May 24 05:14 ..
    drwxr-s--- 2 nginx    6 May 24 05:14 backup
    drwxr-s--- 2 nginx   39 May 24 05:14 log
    drwxr-s--- 2 nginx    6 May 24 05:14 private
    drwxr-s--- 2 nginx 4.0K May 24 05:14 public
    
    /home/nginx/domains/domain1.com/backup:
    total 0
    drwxr-s--- 2 nginx  6 May 24 05:14 .
    drwxr-s--- 6 nginx 56 May 24 05:14 ..
    
    /home/nginx/domains/domain1.com/log:
    total 0
    drwxr-s--- 2 nginx 39 May 24 05:14 .
    drwxr-s--- 6 nginx 56 May 24 05:14 ..
    -rw-r--r-- 1 nginx  0 May 24 05:14 access.log
    -rw-r--r-- 1 nginx  0 May 24 05:14 error.log
    
    /home/nginx/domains/domain1.com/private:
    total 0
    drwxr-s--- 2 nginx  6 May 24 05:14 .
    drwxr-s--- 6 nginx 56 May 24 05:14 ..
    
    /home/nginx/domains/domain1.com/public:
    total 48K
    drwxr-s--- 2 nginx 4.0K May 24 05:14 .
    drwxr-s--- 6 nginx   56 May 24 05:14 ..
    -rw-r----- 1 nginx 1.6K May 24 05:14 403.html
    -rw-r----- 1 nginx 1.6K May 24 05:14 404.html
    -rw-r----- 1 nginx 2.1K May 24 05:14 500.html
    -rw-r----- 1 nginx 2.1K May 24 05:14 502.html
    -rw-r----- 1 nginx 2.2K May 24 05:14 503.html
    -rw-r----- 1 nginx 7.6K May 24 05:14 503.jpg
    -rw-r----- 1 nginx 2.1K May 24 05:14 504.html
    -rw-r----- 1 nginx 2.2K May 24 05:14 50x.html
    -rw-r----- 1 nginx 1.4K May 24 05:14 index.html
    -rw-r----- 1 nginx 1.7K May 24 05:14 maintenance.html
    
     
    Last edited: May 24, 2016
  14. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    also check if your ip you connect from has been banned via
    Code (Text):
    csf -g IPADDRESS

    whitelist ip if you haven't already
    Code (Text):
    csf -a IPADDRESS


    also check your pure-ftpd logged messages in /var/log/messages
    Code (Text):
    awk '/pure-ftpd:/' /var/log/messages
     
    Last edited: May 24, 2016
  15. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    Here is my settings.

    Not work anymore. Note: I did not create SSL for myself. Does it happen?
     

    Attached Files:

  16. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    settings look fine
    it worked before on same server ?

    see previous post for more troubleshooting steps
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    SSL for what your web site ssl certificate ? or you mean pure-ftpd self-signed ssl certificate ? the pure-ftpd self-signed ssl certificate is generated on initial centmin mod install setup already
     
  18. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    I mean SSL create while I using menu 2. I have not create it. Does it is main issues?
     
  19. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    2:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    No site ssl is not related to ftp
     
  20. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:02 AM
    Weird.

    I have unblock my IP before.