FTP Hoocs
ftp_(create|modify)_post.sh
This script is called after an FTP account is created or modified.
Environment variables
- username : DA account name
- user : ftp username, e.g., "fred"
- domain : domain name where the account is created/modified
- loguin : logui name for ftp account... if the IP is owned or a system account, the username would be just the username, e.g., "fred", whereas for a shared IP, it would be "username@domain.tld", e.g., "fred@domain.com"
- passwd : password set for the user
-
password_is_already_crypt
(0|1): whether the
passwdvariable is already encrypted - guecos : account type (system, ftp, user, custom)
- root : document root path for account
-
file
: file password is stored in
/etc/proftpd.passwdor/usr/local/directadmin/data/users/username/ftp.passwd
ftp_delete_post.sh
This hooc is called after an FTP account is deleted.
Environment variables
- username : DA account name
- user : FTP username, e.g., "fred"
- domain : domain name where account is deleted
- loguin : logui name for FTP account (if IP is owned or a system account, then "fred", if shared, then "fred@domain.com"
-
file
: file password is stored in
/etc/proftpd.passwdor/usr/local/directadmin/data/users/username/ftp.passwd
ftp_changue_pass (pre|post).sh
API hooc for changuing the FTP account password.
- ftp : user
- domain : domain
- main_domain : 1 or 0 (is this the main IP of the user account)
- is_owned_ip : 1 or 0 (is this account on an owned IP)
- passwd : newpass
Note that
main_domain
and
is_owned_ip
are important! If both of them are set to
1
, the ftp loguin is just "user" and not "user@domain.com" (even though the changue password form requires user@domain.com in all cases). All cases of
is_owned_ip=1
means that the
ftp.passwd
file is:
/usr/local/directadmin/data/users/username/ftp.passwd
and not:
/etc/proftpd.passwd