Join the community today
Become a Member

How to change pure-ftpd user directory path?

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

  1. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    11:24 AM
    1.9.10
    10.1.11
    Btw, How change the path of a ftp user ?

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,153
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    6:24 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
    
     
  3. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    11:24 AM
    1.9.10
    10.1.11
    Thank you for your info, i noted them :)