SHARE
TWEET

Untitled

a guest Sep 12th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sudo apt update && sudo apt install vsftpd
  2. sudo service vsftpd status
  3. sudo ufw allow OpenSSH
  4. sudo ufw allow 20/tcp
  5. sudo ufw allow 21/tcp
  6. sudo ufw allow 40000:50000/tcp
  7. sudo ufw allow 990/tcp
  8. sudo ufw allow ssh
  9. sudo adduser ftpuser
  10.  
  11. sudo service sshd restart
  12. sudo usermod -d /var/www ftpuser
  13. sudo chown ftpuser:ftpuser /var/www/html
  14. sudo mkdir /home/ftpuser/ftp
  15. sudo chown nobody:nogroup /home/ftpuser/ftp
  16. sudo chmod a-w /home/ftpuser/ftp
  17. sudo mkdir /home/ftpuser/ftp/files
  18. sudo chown ftpuser:ftpuser /home/ftpuser/ftp/files
  19. sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak
  20. sudo nano /etc/vsftpd.conf
  21.  
  22.  
  23. write_enable=YES
  24. chroot_local_user=YES
  25. local_umask=022
  26. force_dot_files=YES
  27. pasv_min_port=40000
  28. pasv_max_port=50000
  29. user_sub_token=$USER
  30. local_root=/home/$USER/ftp
  31.  
  32. sudo systemctl restart vsftpd
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top