Setting up a proftp server

Based on a Debian server a installation of was need for a small project.  This blog post is documentation of that and how I use the software for the project.

  • Install proftpd
  • sudo apt-get install proftpd

Add this line in /etc/shells file (sudo gedit /etc/shells to open the file)

/bin/false

Create a /home/FTPWEB:

  • cd /home
  • sudo mkdir FTPWEB.
  • sudo useradd mbn -p your_password -d /home/FTPWEB  -s /bin/false
  • sudo passwd mbn
  • sudo chmod 777 /home/FTPWEB

proftpd configuration file :

  • nano /etc/proftpd/proftpd.conf

and added this

#VALID LOGINS
<Limit LOGIN>
AllowUser mbm
DenyALL
</Limit>

<Directory /home/FTP-shared>
Umask 022 022
AllowOverwrite off
<Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD>
DenyAll
</Limit>
</Directory>

Making apache work with the FTPWEB folder

  • Apt-get install apache2 php5
  • Nano /etc/apache2/sites-avalible/default

And change the

  • /var/www  >> /home/FTPWEB
  • /etc/init.d/apache2 restart

And now the apache webserver will look ind the /home/FTPWEB folder for a index file or just present the index of the folder

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.