Skip to content

Instantly share code, notes, and snippets.

@alvan
Last active December 28, 2016 10:02
Show Gist options
  • Save alvan/88531e7fab7f8d3dc84c to your computer and use it in GitHub Desktop.
Save alvan/88531e7fab7f8d3dc84c to your computer and use it in GitHub Desktop.
install proftpd on ubuntu
#!/bin/bash
# Proftpd
#apt-get --force-yes -y update
#apt-get --force-yes -y upgrade
rm -rf /etc/proftpd
apt-get --force-yes -y install proftpd
echo "
DefaultRoot ~
AuthOrder mod_auth_file.c
AuthPAM on
AuthUserFile /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group
RequireValidShell off
PersistentPasswd off
AllowRetrieveRestart on
AllowStoreRestart on
" > /etc/proftpd/conf.d/auth.conf
# Proftpd virtual auth, use account www-data
ftpasswd --passwd --name www-data --file /etc/proftpd/ftpd.passwd --uid `cat /etc/passwd | grep www-data | cut -d: -f3` --gid `cat /etc/passwd | grep www-data | cut -d: -f4` --home /var/www/ --shell /usr/sbin/nologin
ftpasswd --group --name www-data --file /etc/proftpd/ftpd.group --gid `cat /etc/passwd | grep www-data | cut -d: -f4` --member www-data
chmod 660 /etc/proftpd/ftpd.passwd /etc/proftpd/ftpd.group
chown proftpd /etc/proftpd/ftpd.passwd /etc/proftpd/ftpd.group
service proftpd stop
service proftpd start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment