proftpd user add

c0ld

Verified User
Joined
Feb 4, 2006
Messages
26
Location
Belgium
Hey,

i just compiled a special apache-ssl installation for a customer panel im writing. But how can I add an ftp account?

In Plesk it was like "adduser blaat" and then edit /etc/passwd to /bin/nologin but it's not working on my Directadmin server. I can't find anything on the proftpd forums.. is my question to stupid/simple? :D

So my question is, how can I add an ftp account via shell and specify it to go to a a special dir (e.g. /usr/controlpanel).

Thanks!
 
Are you saying that you are developing your own control panel?

DA use a modified proftpd. eg. it uses different file to store password of ftp user based on IP, access rights, etc so that it can capture bandwith usage properly.

You can always use API to create new ftp account if that somehow fits into your needs.

CMD_API_FTP
Shows list of accounts and ftp paths.
DOMAIN=domain.com
returns: user=/path/ftp&[email protected]=/path/ftp2

CMD_API_FTP
Create ftp account.
action=create
domain=domain.com
user=user (without @domain.com)
type=system|domain|ftp|user
domain: /home/username/domains/domain.com
ftp: /home/username/domains/domain.com/public_ftp
user: /home/username/domains/domain.com/public_html/user
passwd=pass
passwd2=pass


CMD_API_FTP
Change Ftp Password / Account type.
action=modify
domain=domain.com
user=user (without @domain.com)
type=system|domain|ftp|user
system: system user /home/username
domain: /home/username/domains/domain.com
ftp: /home/username/domains/domain.com/public_ftp
user: /home/username/domains/domain.com/public_html/user
passwd=pass
passwd2=pass

CMD_API_FTP
Delete ftp account(s)
action=delete
domain=domain.com
select0=user (without @domain.com)
(select1=user2)
(...)


CMD_API_FTP_SHOW
Show an ftp account
domain=domain.com
user=user (without @domain.com)
returns: [email protected]&type=usertype&user=user
"type" can be system|domain|ftp|user
"user" is just the user, without @domain.com, but fulluser is the exact login name, whether it be user or [email protected].


CMD_API_FTP_SETTINGS
Get current ftp settings.
domain=domain.com
returns: Anonymous=no&AnonymousUpload=no&AuthUserFile=/usr/local/directadmin/data/users/usrename/ftp.passwd&DefaultRoot=/home/anixs/domains/steve.com/public_ftp&ExtendedLog=/var/log/proftpd/1.2.3.4.bytes&MaxClients=20&MaxLoginAttempts=3&[email protected]&ServerName=ProFTPd&defaultdomain=no&ip=1.2.3.4&message=Ftp welcome message text.

Note that many of those settings are not going to be of any use to you. (some/many may not be used for the ftp setup ie: maxclients etc.)

CMD_API_FTP_SETTINGS
Set current settings.
domain=domain.com
action=modify
anon=yes|no
anonup=yes|no
message=welcome message text
 
Back
Top