Guest User

Untitled

a guest
Feb 10th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. To install execute the following command: `sudo apt install vsftpd`
  2.  
  3. Make backup of the **/etc/vsftpd.conf** by executing: `sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak`.
  4. Clear all from the **/etc/vsftpd.conf** and paste the following lines:
  5.  
  6. ```
  7. listen=YES
  8.  
  9. anon_root=/srv/ftp/public
  10.  
  11. anonymous_enable=YES
  12. no_anon_password=YES
  13. write_enable=YES
  14. anon_upload_enable=YES
  15. anon_mkdir_write_enable=YES
  16. anon_other_write_enable=YES
  17. anon_world_readable_only=YES
  18. dirmessage_enable=YES
  19. hide_ids=YES
  20.  
  21. ftp_username=ftp
  22. ```
  23.  
  24. Create a public anonymous folder in the directory **/srv/ftp** and set permissions by executing:
  25. ```bash
  26. sudo mkdir /srv/ftp/public
  27. sudo chmod 775 /srv/ftp/public
  28. sudo chown nobody:nogroup /srv/ftp/public
  29. ```
  30. Also create folder to upload files by executing:
  31. ```bash
  32. sudo mkdir /srv/ftp/public/upload
  33. sudo chmod 755 /srv/ftp/public/upload
  34. sudo chown ftp:root /srv/ftp/public
  35. ```
  36.  
  37. After that, you can download files from *root* at FTP and upload files to directory *upload*.
  38.  
  39. Additional
  40. ----------
  41.  
  42. You may wish to disable FTP server by default, to do that execute:
  43. ```bash
  44. sudo service vsftpd disable
  45. ```
  46. To start FTP server until reboot, execute:
  47. ```
  48. sudo service vsftpd start
  49. ```
  50. You can create symbolic link to the ftp public folder in the *Destop* folder by executing:
  51. ```bash
  52. ln -s /srv/ftp/public ~/Desktop/ftp_share
  53. ```
Add Comment
Please, Sign In to add comment