{"id":214,"date":"2015-09-07T06:22:28","date_gmt":"2015-09-07T06:22:28","guid":{"rendered":"http:\/\/onlinelab.info\/?p=214"},"modified":"2015-09-07T06:22:28","modified_gmt":"2015-09-07T06:22:28","slug":"how-to-configure-ftp-server-in-linux","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/07\/how-to-configure-ftp-server-in-linux\/","title":{"rendered":"How to configure FTP Server in Linux"},"content":{"rendered":"<p>Three rpm are required to configure ssh server. <strong>vsftpd, portmap, xinetd <\/strong>check them if not found then install<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_rpm.jpg\" alt=\"rpm\" width=\"295\" height=\"118\" border=\"0\" title=\"\"><\/p>\n<p>Now check <strong>vsftpd, portmap, xinetd<\/strong> service in system service it should be on<\/p>\n<div class=\"code\">\n<pre><strong> #setup\n Select <strong> System service<\/strong> from list\n [*]portmap\n [*]xinetd\n [*]vsftpd <\/strong><\/pre>\n<\/div>\n<p>Now restart <strong>xinetd<\/strong> and <strong>portmap<\/strong> and <strong>vsftpd<\/strong> service<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass24_service_restart.jpg\" alt=\"service restart\" width=\"607\" height=\"119\" border=\"0\" title=\"\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_service_restart.jpg\" alt=\"service vsftpd restart\" width=\"607\" height=\"86\" border=\"0\" title=\"\"><br \/>\nTo keep on these services after reboot on then via <strong>chkconfig<\/strong> command<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass24_chkconfig.jpg\" alt=\"chkconfig\" width=\"337\" height=\"55\" border=\"0\" title=\"\"><br \/>\nAfter reboot verify their status. It must be in running condition<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass24_service_status.jpg\" alt=\"service status\" width=\"354\" height=\"84\" border=\"0\" title=\"\"><\/p>\n<p>Create a normal user named<strong> vinita<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/useradd_vinita.jpg\" alt=\"useradd\" width=\"495\" height=\"129\" border=\"0\" title=\"\"><\/p>\n<p>Login for this user on other terminal and create a <strong>test<\/strong> file<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_cat_on_server.jpg\" alt=\"create file\" width=\"409\" height=\"48\" border=\"0\" title=\"\"><\/p>\n<div class=\"custom\">On Linux client<\/div>\n<p><strong>ping<\/strong> from <strong>ftp server<\/strong> and run <strong>ftp<\/strong> command and give <strong>username<\/strong> and <strong>password<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_vinita_login_linux.jpg\" alt=\"user login ftp server\" width=\"571\" height=\"400\" border=\"0\" title=\"\"><br \/>\nafter login you can download files from the specified directories<\/p>\n<h3>Most commonly commands used on ftp prompt are<\/h3>\n<div class=\"code\">\n<pre><b>put<\/b>  To upload files on server\n<b>get<\/b>  To download files from server\n<b>mput<\/b> To upload all files\n<b>mget<\/b> To download all files\n<b>?<\/b>    To see all available command on ftp prompts\n<b>cd<\/b>   To change remote directory\n<b>lcd<\/b>  To change local directory.\n<\/pre>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_help.jpg\" alt=\"help commands on ftp server\" width=\"470\" height=\"163\" border=\"0\" title=\"\"><\/p>\n<div class=\"custom\"><\/div>\n<h2>On window clients<\/h2>\n<p>Now go on window clients and create a file. <strong>copy con<\/strong> command is used to create files on window. To save use<strong> CTRL+Z <\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_copy_con.jpg\" alt=\"copy con\" width=\"294\" height=\"125\" border=\"0\" title=\"\"><\/p>\n<p>Now ping from <strong>ftp server<\/strong> and invoke <strong>ftp session<\/strong> from server, login from user account and download as well as uploads files<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_vinita_login_win.jpg\" alt=\"user login on window system\" width=\"480\" height=\"325\" border=\"0\" title=\"\"><\/p>\n<h3>Enable root account for ftp session and set permission on user<\/h3>\n<p>By default on vsftpd server<strong> root account<\/strong> is disable. You cannot login from root account.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_root_deny.jpg\" alt=\"deny root for ftp sessions\" width=\"359\" height=\"121\" border=\"0\" title=\"\"><\/p>\n<p>Now we will enable<strong> root account<\/strong> for<strong> ftp session<\/strong> and same time we will disable our normal user<strong> vinita<\/strong> to use ftp sessions.<\/p>\n<p>open file <strong>\/etc\/vsftpd\/ftpusers <\/strong>. Users whose name are set in this file will not allowed to login from ftp.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_vi_ftpuser.jpg\" alt=\"vi ftpuser\" width=\"406\" height=\"24\" border=\"0\" title=\"\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_file_ftpuser.jpg\" alt=\"ftp user\" width=\"406\" height=\"129\" border=\"0\" title=\"\"><\/p>\n<p>By default this file have an entry for <strong>root<\/strong> that why <strong>root<\/strong> are not allowed to use ftp. remove<strong> root<\/strong> from list and <strong>add user vinita<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_file_ftpuser_changed.jpg\" alt=\"ftp user \" width=\"409\" height=\"158\" border=\"0\" title=\"\"><\/p>\n<p>Now remove entry form<strong> \/etc\/vsftpd\/user_list<\/strong> files. Users whose names are set in this file are also not allowed to login from<strong> ftp<\/strong> even they are not prompt for password.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_vi_userlist.jpg\" alt=\"\" width=\"400\" height=\"23\" border=\"0\" title=\"\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_file_userlist.jpg\" alt=\"userlist\" width=\"650\" height=\"145\" border=\"0\" title=\"\"><br \/>\nBy default this file have an entry for <strong>root<\/strong> that way <strong>root<\/strong> is denied form login even not asked for password remove <strong>root<\/strong> from list and<strong> add user vinita<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_file_userlist_changed.jpg\" alt=\"userlist\" width=\"650\" height=\"165\" border=\"0\" title=\"\"><\/p>\n<p>After saving change in these files restart the <strong>vsftpd<\/strong> service<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_service_restart.jpg\" alt=\"service vsftpd restart\" width=\"607\" height=\"86\" border=\"0\" title=\"\"><\/p>\n<p>Now go on client system and login from<strong> root<\/strong> this time <strong>root<\/strong> will login<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_root_login.jpg\" alt=\"root login\" width=\"364\" height=\"135\" border=\"0\" title=\"\"><\/p>\n<p>Now try to login form user<strong> vinita<\/strong> she should not prompt form password also<\/p>\n<h3>How to set login banner for ftp server<\/h3>\n<p>To set login banner open<strong> \/etc\/vsftpd\/vsftpd.conf<\/strong> file and search for this tag<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_banner.jpg\" alt=\"banner\" width=\"495\" height=\"114\" border=\"0\" title=\"\"><br \/>\nUncomment this tag and set your banner and save file , and restart the<strong> vsftpd<\/strong> service<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_banner1.jpg\" alt=\"banner\" width=\"494\" height=\"114\" border=\"0\" title=\"\"><\/p>\n<p>Go on client system and check banner it will appear before user login<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"padded s5_lazyload\" src=\"http:\/\/computernetworkingnotes.com\/images\/rhce_certification\/image\/ass30_banner_xp.jpg\" alt=\"\" width=\"381\" height=\"85\" border=\"0\" title=\"\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Three rpm are required to configure ssh server. vsftpd, portmap, xinetd check them if not found then install Now check vsftpd, portmap, xinetd service in system service it should be on #setup Select System service&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-214","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}