{"id":230,"date":"2015-07-06T11:10:39","date_gmt":"2015-07-06T11:10:39","guid":{"rendered":"http:\/\/www.howtolearnlinux.com\/?p=230"},"modified":"2015-07-06T14:07:15","modified_gmt":"2015-07-06T14:07:15","slug":"file-transfer-protocol-ftp","status":"publish","type":"post","link":"http:\/\/shijuvarghese.com\/?p=230","title":{"rendered":"File Transfer Protocol (FTP)"},"content":{"rendered":"<p>Package: vsftpd&#8212;-.rpm<br \/>\nConfiguration file: \/etc\/vsftpd\/vsftpd.conf<br \/>\nPackage: ftp (client)<\/p>\n<p>Two types of login:<br \/>\n(a) Anonymous login: Anyone can login using the username &#8220;anonymous&#8221; or &#8220;ftp&#8221;, with password field blank. Here the user will be restricted to only &#8216;\/var\/ftp\/pub&#8217; folder. Only download is allowed here<\/p>\n<p>(b) Non-anonymous login: Requires a valid username and password. Both upload and download is allowed based on user&#8217;s access permissions.<\/p>\n<p>The entry &#8220;anonymous_enable=YES&#8221; in vsftpd.conf manages this feature.<\/p>\n<p>Client commands<\/p>\n<p># get: To download<br \/>\n# mget: get multiple downloads<br \/>\n# pwd: Remote system&#8217;s current directory<br \/>\n# !pwd: Our current dir<br \/>\n# bye: exit from FTP client<br \/>\n# close: Logout<br \/>\n# open: Log in to a server<br \/>\n# put: Upload file<\/p>\n<p>To restrict local users to login to ftp we need to uncomment the entry local_enable=YES in vsftpd.conf. Now if you try to ftp via command line, you may see the message This FTP server is anonymous only.<\/p>\n<p>To restrict local users to access only their home folder, uncomment the entry chroot_list_enable=YES and chroot_list_file=\/etc\/vsftpd\/chroot_list in &#8216;vsftpd.conf&#8217;.<br \/>\nIn the choot_list file remember to add the usernames of people who should have only access to their home folder.<\/p>\n<p>To restrict few users to access ftp, add their usernames in \/etc\/vsftpd\/ftpusers.<\/p>\n<p>FTP access can be controlled using \/etc\/vsftpd\/user_list too. First add usernames in this file. Now edit &#8216;vsftpd.conf&#8217;. If userlist_deny=NO is enabled, it only allow users in this file to access via ftp. If userlist_deny=YES is enabled, ftp never allow users in this file to login.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Package: vsftpd&#8212;-.rpm Configuration file: \/etc\/vsftpd\/vsftpd.conf Package: ftp (client) Two types of login: (a) Anonymous login: Anyone can login using the username &#8220;anonymous&#8221; or &#8220;ftp&#8221;, with <a class=\"mh-excerpt-more\" href=\"http:\/\/shijuvarghese.com\/?p=230\" title=\"File Transfer Protocol (FTP)\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":267,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,3],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ftp","category-linux"],"_links":{"self":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":1,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"predecessor-version":[{"id":231,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions\/231"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=\/wp\/v2\/media\/267"}],"wp:attachment":[{"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shijuvarghese.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}