Jul 09

Proftpd and mounting with bind option

There’s only one good way to export resources to chrooted enviroment - using mounting directores to several locations in the filesysem. If you want to have an exact duplicate of the /var/ftp/common directory available for user alex at his /home/alex/common, use one these commands:

mount -o bind /var/ftp/common /home/alex/common
mount -o bind /var/ftp/common /home/alex/common

To keep directories mounted permanently you need to add them into /etc/fstab ( or /etc/vfstab for Solaris ).

written by rtokarski

Jun 15

After installing proftpd type as root:

ln -s /bin/false /bin/ftp
echo "/bin/ftp" >> /etc/shells
useradd -d /my/directory/ -s /bin/ftp -g my_group my_user

Now in /etc/proftpd.conf

<ifuser>
Umask 012 002
</ifuser>
<limit>
Allow from 192.168.1.0/24 81.219.39.3
DenyAll
</limit>

written by rzelazko