Join the community today
Register Now

How to change pure-ftpd user directory path?

Discussion in 'Other Centmin Mod Installed software' started by negative, May 24, 2016.

  1. negative

    negative Member

    212
    20
    18
    Apr 11, 2015
    Ratings:
    +48
    Local Time:
    11:25 PM
    1.9.10
    10.1.11
    Btw, How change the path of a ftp user ?
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,034
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,784
    Local Time:
    6:25 AM
    Nginx 1.13.x
    MariaDB 5.5
    Using pure-pw command. pure-pw manual is here and see Beta Branch - Centmin Mod .08 beta + pure-ftpd virtual FTP user support | Centmin Mod Community

    before user1 pure-ftpd user info
    Code (Text):
    pure-pw show user1
    
    Login              : user1
    Password           : $6$gVsjJurht0boN7B0$xwEu3pf7zNgO3aZf9U.zIHSHpgPjDL8T7zmrtNWtkPAbNS.cM9ssCLzdCFeWOUwPnwrsWueRyS.5kq9yZRUe01
    UID                : 1000 (nginx)
    GID                : 1000 (nginx)
    Directory          : /home/nginx/domains/domain.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)
    

    so change to /home/user1
    Code (Text):
    pure-pw usermod user1 -d /home/user1
    pure-pw mkdb

    after
    Code (Text):
    pure-pw show user1                      
    
    Login              : user1
    Password           : $6$gVsjJurht0boN7B0$xwEu3pf7zNgO3aZf9U.zIHSHpgPjDL8T7zmrtNWtkPAbNS.cM9ssCLzdCFeWOUwPnwrsWueRyS.5kq9yZRUe01
    UID                : 1000 (nginx)
    GID                : 1000 (nginx)
    Directory          : /home/user1/./
    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)
    

    but the new directory has to have nginx user/group permissions as well otherwise you'd get error
    Code (Text):
    22:05:46    Response:    550 Can't change directory to /: Permission denied
    22:05:46    Error:    Failed to retrieve directory listing
    
     
    • Informative Informative x 1
  3. negative

    negative Member

    212
    20
    18
    Apr 11, 2015
    Ratings:
    +48
    Local Time:
    11:25 PM
    1.9.10
    10.1.11
    Thank you for your info, i noted them :)