Pureftpd-Ftp user management under Cpanel

Ftp user management under Cpanel
 
 
1.Directory structure of Pureftpd
 
  Program : /usr/sbin/pure-ftpd
  •   Init Script :/etc/rc.d/init.d/pure-ftpd : /scripts/restartsrv_ftpserver
  •   Conf: /etc/pure-ftpd.conf
  •   Accounts file: /etc/proftpd/$username (all ftp accounts are stored here)
  •   Anonymous ftp document root – /etc/pure-ftpd/ip-address
2.Ftp user management with command line :
 
2.1 Add a new ftp user:
Syntax:
/usr/local/cpanel/bin/proftpd_passwd  <sys user> -a <vuser>:<passwd>:<uid>:<gid>:<owner>:<home_dir>:<shell>
 
Example:
 
I created a reseller dbm in cpanel ,added a domain centos.com, now I will create a ftp user ftpuser1. Here are the steps:
 
# grep  dbm  /etc/ passwd                   
dbm:x:1000:1002::/home/dbm:/bin/bash
 
# /usr/local/cpanel/bin/proftpd_passwd  dbm –a  ftpuser1:12341qaz:1000:1002:dbm:/home/dbm/ public_html/centos.com/ftpuser1:/sbin/nologin
 
#mkdir /home/dbm/ public_html/centos.com/ftpuser1
 
#chown  dbm:dbm   /home/dbm/ public_html/centos.com/ftpuser1
 
# /usr/local/cpanel/bin/ftpupdate
 
2.2 Delete a ftp user
Syntax: 
/usr/local/cpanel/bin/proftpd_passwd <sys user> -d <vuser>
 
Run the command below to delete the user ftpuser1
 
#/usr/local/cpanel/bin/proftpd_passwd  dbm –d ftpuser1
 
#/usr/local/cpanel/bin/ftpupdate
 
Alternatly, you can remove the related line in /etc/proftpd/passwd.vhost  and /etc/proftpd/dbm, then update ftp .
 
 

Add Feedback