1.In /etc/proftpd/proftpd.conf
DefaultRoot ~
AuthUserFile /etc/proftpd/ftpd.passwd
RequireValidShell off
- Enter the following command and password followed by the command after changing the directory to the /etc/proftpd/
ftpasswd –stdin –passwd –name username –uid 33 –gid 33 –home /var/www –shell /bin/false
Where:
Username: The username required for the user.
/var/www: The home directory of the user. ie; change as required.
Also set /etc/proftpd/ recursively under the ownership and group “proftpd”
Note: Depending on the UID and GID the permissions will be set on the files for the newly uploaded files under the FTP accounts.
- /etc/init.d/proftpd restart
That’s all done!!
**************************
Notes:
In centos/other version installations the proftpd configuration will be setup to authenticate from “pam.d” so in this case please use the following configuration
DefaultRoot ~
AuthUserFile /etc/proftpd/ftpd.passwd
RequireValidShell off
AuthPAM off
Then in AWS servers use “MasqueradeAddress PUBLIC IP OF THE SERVER” and also open necessary passive ports.
Eg:
DefaultRoot ~
AuthUserFile /etc/proftpd/ftpd.passwd
RequireValidShell off
AuthPAM off
PassivePorts 40000 50000
MasqueradeAddress 52.76.44.148
**************************
References: http://positon.org/proftpd-and-authuserfile-for-password-file