Through this blog we will be discussing about FTP & SFTP server configuration on Linux Server.
So what is FTP?
File Transfer Protocol (FTP) is a standard protocol used to transfer computer files between client and server on a computer network.
FTP – File transfer protocol is used to transfer files from one host to another over TCP. FTP is a secure transmission medium and through this blog we will configure FTP server on Centos Linux.
Note: Before configuring FTP server, you require a sudo user who has root privileges. Perform all the steps through root only.
Prefer root to configure ftp or vsftpd server.
Configuring FTP Server on Centos 6 Linux
Step 1. Start with installing vsftpd package:
1 |
yum install vsftpd -y |
Step 2. Install ftp packages:
1 |
Yum install ftp* -y |
Step 3. Open /etc/vsftpd/vsftpd.conf file to configure ftp server:
1 |
vi /etc/vsftpd/vsftpd.conf |
Update all the properties accordingly to below lines:
1 2 3 4 5 |
anonymous_enable=NO local_umask=022 chroot_local_user=YES <span style="font-weight: 400;"> #(</span><span style="font-weight: 400;">this property used to limit the users to their home directories.)</span> |
Next, find these properties and Uncomment the below lines:
1 2 3 |
local_enable=YES write_enable=YES |
Step 4. Next, create a user for accessing FTP server.
1 |
useradd acd |
Provide password to this user.
1 |
passwd acd |
Step 5. Start vsftpd service by using the below command.
1 |
service vsftpd start |
1 |
service vsftpd restart |
Now type the below command to start FTP server service automatically at startup:
1 |
chkconfig vsftpd on |
Step 6: Disable firewall ( Iptables )
1 |
service iptables stop |
1 |
chkconfig iptables off |
Step 7: Move to pub directory to upload files:
1 |
cd /var/ftp/pub |
Now put some files to pub directory so one can access that files.
mkdir acadgild
Vi prateek
Vi kiran
Refer to the screenshot given below:
Now open FTP path (ftp://ftp-server-IP or ftp://server_name/) in remote machine’s browser. It will ask for Authentication. After that you can see the created files list.
ftp://server-ip
FTP Server is now configured in Linux Server.
Hope this blog was informative enough to get you started. keep visiting to https://acadgild.com/blog/
Leave a Reply