Skip to content

Instantly share code, notes, and snippets.

@zicodhkbd
Created November 1, 2019 18:00
Show Gist options
  • Save zicodhkbd/9e8be40871201e9698f1c2402f7e4dc3 to your computer and use it in GitHub Desktop.
Save zicodhkbd/9e8be40871201e9698f1c2402f7e4dc3 to your computer and use it in GitHub Desktop.
FTP server on Ubuntu 18.04 LTS
#!/bin/sh
sudo apt update
sudo apt install vsftpd
sudo cp -v /etc/vsftpd.conf /etc/vsftpd.conf.bk
sudo nano /etc/vsftpd.conf
Uncomment below lines.
write_enable=YES
local_umask=022
chroot_local_user=YES
Add below lines at the end of the file.
allow_writeable_chroot=YES
pasv_min_port=40000
pasv_max_port=40100
sudo systemctl enable vsftpd
sudo systemctl restart vsftpd
sudo systemctl status vsftpd
sudo useradd -m sas -s /usr/sbin/nologin
sudo passwd sas
echo "/usr/sbin/nologin" | sudo tee -a /etc/shells
sudo apt install filezilla
ftp localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment