{"id":1552,"date":"2019-05-03T22:18:00","date_gmt":"2019-05-03T21:18:00","guid":{"rendered":"https:\/\/www.balajibandi.com\/?p=1552"},"modified":"2022-05-03T14:52:57","modified_gmt":"2022-05-03T13:52:57","slug":"setup-easy-and-quickway-ftp-server","status":"publish","type":"post","link":"https:\/\/www.balajibandi.com\/?p=1552","title":{"rendered":"Setup easy and quickway FTP Server"},"content":{"rendered":"\n<p>Simple 10 Steps away to setup FTP Server on your Linux box and its Life time free !!!!<\/p>\n\n\n\n<p>Thtats the power of Linux !<\/p>\n\n\n\n<p>Conside you already Linux running, you like to setup FTP Server &#8211; easy and peezy !<\/p>\n\n\n\n<p>My Environment : Ubunut Linux<\/p>\n\n\n\n<p><strong>Step 1 : Install vsftpd<\/strong><\/p>\n\n\n\n<p>apt-get install vsftpd<\/p>\n\n\n\n<p><strong>Step2 : Create a FTP User<\/strong><\/p>\n\n\n\n<p>#adduser balajibandi  ( Follow the instruction in the menu) &#8211; with the password<\/p>\n\n\n\n<p>When you Create a User it will crate user directory in \/home (this where user files stores)<\/p>\n\n\n\n<p>\/home\/balajibandi<\/p>\n\n\n\n<p>Lets create a directory for ftp<\/p>\n\n\n\n<p>mkdir \/home\/balajibandi\/ftp<br>chown nobody:nogroup \/home\/balajibandi\/ftp<br>chmod a-w nobody:nogroup \/home\/kempuser\/ftp<br>chmod a-w \/home\/balajibandi\/ftp<br>ls -al \/home\/balajibandi\/ftp<br>mkdir \/home\/balajibandi\/ftp\/files<br>chown balajibandi:balajibandi \/home\/kempuser\/ftp\/files<\/p>\n\n\n\n<p><strong>Step3: edit vsftpd.conf to make it work. (my config look as below)<\/strong><\/p>\n\n\n\n<p>listen=NO<br>listen_ipv6=YES<br>anonymous_enable=NO<br>local_enable=YES<br>write_enable=YES<br>dirmessage_enable=YES<br>use_localtime=YES<br>xferlog_enable=YES<br>connect_from_port_20=YES<br>xferlog_file=\/var\/log\/vsftpd.log<br>chroot_local_user=YES<br>user_sub_token=$USER<br>local_root=\/home\/$USER\/ftp<br>pasv_min_port=40000<br>pasv_max_port=50000<br>userlist_enable=YES<br>userlist_file=\/etc\/vsftpd.userlist<br>userlist_deny=NO<br>secure_chroot_dir=\/var\/run\/vsftpd\/empty<br>pam_service_name=vsftpd<\/p>\n\n\n\n<p><strong>step 4 : adding user to vsfdlist<\/strong><\/p>\n\n\n\n<p>echo &#8220;balajibandi&#8221; | sudo tee -a \/etc\/vsftpd.userlist<\/p>\n\n\n\n<p><strong>step 5:  start the service <\/strong><\/p>\n\n\n\n<p>\/etc\/init.d\/vsftpd start   &#8211; start the service<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\/etc\/init.d\/vsftpd status &#8211; check the status<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\/etc\/init.d\/vsftpd status<\/h1>\n\n\n\n<p>\u25cf vsftpd.service &#8211; vsftpd FTP server<br>Loaded: loaded (\/lib\/systemd\/system\/vsftpd.service; enabled; vendor preset: enabled)<br>Active: active (running) since Tue XXXXXX BST; 2h 32min ago<br>Process: 21814 ExecStartPre=\/bin\/mkdir -p \/var\/run\/vsftpd\/empty (code=exited, status=0\/SUCCESS)<br>Main PID: 21816 (vsftpd)<br>Tasks: 1 (limit: 4915)<br>CGroup: \/system.slice\/vsftpd.service<br>\u2514\u250021816 \/usr\/sbin\/vsftpd \/etc\/vsftpd.conf<\/p>\n\n\n\n<p>May 0X 12:14:38 BB-SYSLOG systemd[1]: Starting vsftpd FTP server\u2026<br>May 0X 12:14:38 BB-PR-SYSLOG systemd[1]: Started vsftpd FTP server.<\/p>\n\n\n\n<p><strong>Step 6 : check the FTP connection with user created,<\/strong><\/p>\n\n\n\n<p>Use any FTP Client and connect<\/p>\n\n\n\n<p><strong>Step 7:  Check the Logs<\/strong><\/p>\n\n\n\n<p><strong>CONNECT: Client &#8220;::ffff:10.18.94.19&#8221;<br>[kempuser] OK LOGIN: Client &#8220;::ffff:10.18.94.19&#8221;<br>[kempuser] OK UPLOAD: Client &#8220;::ffff:10.18.94.19&#8221;, &#8220;\/files\/backup_12.27&#8221;, 8686 bytes, 9932.58Kbyte\/sec<\/strong><\/p>\n\n\n\n<p><strong>Step 8 :  You can do Cron Job or any email alerts<\/strong><\/p>\n\n\n\n<p><strong>Step 9 : keep checking the folder size and do home clearning work.<\/strong><\/p>\n\n\n\n<p><strong>Step 10 : Relax and you setup free FTP Service for Life<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>happy Labbbbing !!!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Simple 10 Steps away to setup FTP Server on your Linux box and its Life time free !!!! Thtats the power of Linux ! Conside you already Linux running, you like to setup FTP Server &#8211; easy and peezy ! My Environment : Ubunut Linux Step 1 : Install vsftpd apt-get install vsftpd Step2 : [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1552","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1552"}],"version-history":[{"count":1,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1552\/revisions"}],"predecessor-version":[{"id":1553,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1552\/revisions\/1553"}],"wp:attachment":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}