Skip to content

Instantly share code, notes, and snippets.

@gmcinnes
Created February 26, 2012 23:31
Show Gist options
  • Select an option

  • Save gmcinnes/1919712 to your computer and use it in GitHub Desktop.

Select an option

Save gmcinnes/1919712 to your computer and use it in GitHub Desktop.
Install FTP
apt-get install proftpd -y
(
cat <<EOP
# Port 21 for ftp
-A FWR -p tcp --dport 21 -j ACCEPT
EOP
) > /etc/iptables.d/ftp
iptables -I INPUT -p tcp --dport 21 -j ACCEPT
chmod -R 777 /var/www/www.marsdd.com/
chown -R www-data:www-data /var/www/www.marsdd.com/
(
cat <<EOF
UseIPv6 off
DefaultRoot /var/www
ServerName "Debian"
ServerType standalone
DeferWelcome off
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayChdir .message true
ListOptions "-l"
DenyFilter \*.*/
Port 21
User www-data
Group www-data
Umask 022 022
AllowOverwrite on
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
<Directory /var/www>
<Limit ALL>
AllowAll
</Limit>
</Directory>
EOF
) > /etc/proftpd/proftpd.conf
/etc/init.d/proftpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment