{"id":147,"date":"2017-07-09T10:51:05","date_gmt":"2017-07-09T10:51:05","guid":{"rendered":"http:\/\/jaipurhosting.com\/blog\/?p=147"},"modified":"2024-10-30T18:01:29","modified_gmt":"2024-10-30T12:31:29","slug":"configure-ftp-server-centos-6","status":"publish","type":"post","link":"https:\/\/www.jaipurhosting.com\/blog\/configure-ftp-server-centos-6\/","title":{"rendered":"How to configure ftp server on centos 6"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><strong>Description :&nbsp;<\/strong><\/p>\n<p>* FTP \u2013 File transfer protocol is used to transfer files from one host to another over TCP<\/p>\n<p>* Configuring ftp server on linux is safe and secure.<\/p>\n<p>* In this article we can see how to configure ftp server on centos 6.<\/p>\n<p>Please follow the steps.<\/p>\n<p><strong>Step 1 : &nbsp;<\/strong><\/p>\n<p>Vsftpd is a lightweight FTP server package for Centos (linux).<br \/>\nStart installing package by issuing below command.<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">[root@leela ~]# yum -y install vsftpd<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 2 :&nbsp;<\/strong><\/p>\n<p>After installation, Open the file \/etc\/vsftpd\/vsftpd.conf which is the config file for vsftpd.<\/p>\n<p>Replace YES to NO in the below line.<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">anonymous_enable=NO<\/pre>\n<p>Find and Uncomment the below lines<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">local_enable=YES<\/pre>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">write_enable=YES<\/pre>\n<p>and uncomment this line to limit the users to their home directories.<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">chroot_local_user=YES<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 3 :&nbsp;<\/strong><\/p>\n<p>Create a folder where you want to store FTP data. I&#8217;m going to create in \/ ( root folder ) like below<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">[root@leela ~]# mkdir \/ftp<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 4 :&nbsp;<\/strong><\/p>\n<p>Now start creating users for accessing ftp server<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">[root@user ~]# useradd -d \/ftp\/user1 user1\n[root@user ~]# passwd user1\nChanging password for user user1.\nNew password:<\/pre>\n<p>&nbsp;<\/p>\n<p>You just created username user1 with home directory \/ftp\/user1 .<\/p>\n<p><strong>Step 5 :&nbsp;<\/strong><\/p>\n<p>Start vsftpd service by issuing the below command.<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">[root@leela ~]# service vsftpd start<\/pre>\n<p>and type this below command to start ftp server service automatically while booting.<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">[root@leela ~]# chkconfig --levels 235 vsftpd on<\/pre>\n<p><strong>Step 6 :&nbsp;<\/strong><\/p>\n<p>That\u2019s it, Now we can check the FTP access .Create some files in \/ftp\/user1 folder<\/p>\n<p>[root@user ~]# touch \/ftp\/user1\/test<br \/>\n[root@user ~]# touch \/ftp\/user1\/test1<br \/>\n[root@user ~]# touch \/ftp\/user1\/test2<\/p>\n<p>Now open ftp path in remote machine browser ftp:\/\/ftp-server-IP ( ftp:\/\/123.45.56.789 ).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-148\" src=\"http:\/\/jaipurhosting.com\/blog\/wp-content\/uploads\/2017\/07\/ftps.png\" alt=\"\" width=\"626\" height=\"387\" srcset=\"https:\/\/www.jaipurhosting.com\/blog\/wp-content\/uploads\/2017\/07\/ftps.png 626w, https:\/\/www.jaipurhosting.com\/blog\/wp-content\/uploads\/2017\/07\/ftps-300x185.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/p>\n<p>You can see the created files after authentication.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Disable firewall ( Iptables ) : &nbsp;<\/strong><\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true\">[root@leela ~]# service iptables stop\n[root@leela ~]# chkconfig iptables off<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Disable Selinux :&nbsp;<\/strong><\/p>\n<p>open the file \/etc\/selinux\/config and find the line<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">SELINUX=enforcing<\/pre>\n<p>and replace with<\/p>\n<pre class=\"theme:dark-terminal line-height:40 lang:default decode:true \">SELINUX=disabled<\/pre>\n<p>now reboot the server and try again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Description :&nbsp; * FTP \u2013 File transfer protocol is used to transfer files from one host to another over TCP * Configuring ftp server on linux is safe and secure. * In this article we can see how to configure ftp server on centos 6. Please follow the steps. Step 1 : &nbsp; Vsftpd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1013,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=147"}],"version-history":[{"count":3,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":2325,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/147\/revisions\/2325"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media\/1013"}],"wp:attachment":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}