Installing PROFTPD
# change proftpd umask on new file/directory creationg /etc/proftpd/proftpd.conf
Umask 022 022
# Umask dir file
#
# How to calculate it
# Dir has max 777
# file has max 666
# Examples
Set 764 for folders:
777 - 764 = 013
Set 664 fo files:
666 - 664 = 002
# install standalone
sudo apt-get install proftpd
# open /etc/proftpd/proftpd.conf
ServerName "hostname.com"
# Use this to jail all users in their homes | jailing all users except from group "webium"
DefaultRoot ~ !webium
# restart and start
sudo service proftpd restart
sudo service proftpd start
# mounting /srv/www/example.com to /home/username/example.com
sudo mount --bind /srv/www/example.com /home/username/example.com
# unmount
sudo umount -l /home/username/example.com
# all mounted folder /proc/mounts | don't forget to log out in ftp client or stop proftpd before unmounting
# if you want to preserve all mounts with --bind then go to /etc/fstab
/path/to/source/dir /path/to/mount/point none bind 0 0
# UNCOMMENT IN /etc/proftpd/proftpd.conf
RequireValidShell off