How to install VSFTPD Server on Oracle Linux 8.8
- 00:32 cat /etc/os-release
- 00:51 yum install vsftpd
- 01:21 systemctl start vsftpd
- 01:36 systemctl enable vsftpd
- 01:56 systemctl status vsftpd
- 02:11 useradd ftpuser1
- 02:28 passwd ftpuser1
- 02:50 vim /etc/vsftpd/user_list
- 03:24 vim /etc/vsftpd/vsftpd.conf
- 04:20 systemctl restart vsftpd
- 04:41 touch /home/ftpuser1/abc{1..5}
- 05:11 rpm -q ftp
- 05:24 yum install ftp
- 05:45 ftp 192.168.6.136
- 06:10 ls
- 06:21 get abc1
- 06:39 !ls
- 06:50 exit
To Install Vsftpd Server On Oracle Linux 8.8
Introduction:
FTP stands for File Transfer Protocol, used for transferring files from a server to the network. FTP is built on a client–server model architecture. The initial client-to-server connection on port 21.
Installation steps:
Step 1: check the OS version by using the below command
[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.8"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:8:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.8
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.8
Step 2: Install vsftpd packages by using the below command
[root@linuxhelp ~]# yum install vsftpd
Last metadata expiration check: 2:10:33 ago on Friday 16 June 2023 11:44:48 PM IST.
Dependencies resolved.
===============================================================================
Package Architecture Version Repository Size
===============================================================================
Installing:
vsftpd x86_64 3.0.3-35.el8 ol8_appstream 181 k
Transaction Summary
===============================================================================
Install 1 Package
Total download size: 181 k
Installed size: 347 k
Is this ok [y/N]: y
Downloading Packages:
vsftpd-3.0.3-35.el8.x86_64.rpm 341 kB/s | 181 kB 00:00
-------------------------------------------------------------------------------
Total 337 kB/s | 181 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : vsftpd-3.0.3-35.el8.x86_64 1/1
Running scriptlet: vsftpd-3.0.3-35.el8.x86_64 1/1
Verifying : vsftpd-3.0.3-35.el8.x86_64 1/1
Installed:
vsftpd-3.0.3-35.el8.x86_64
Complete!
Step 3: Start the vsftpd service by using the below command
[root@linuxhelp ~]# systemctl start vsftpd
Step 4: Enable the vsftpd service by using the below command
[root@linuxhelp ~]# systemctl enable vsftpd
Created symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /usr/lib/systemd/system/vsftpd.service.
Step 5: Check the status of vsftpd service by using the below command
[root@linuxhelp ~]# systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor pre>
Active: active (running) since Sat 2023-06-17 01:55:50 IST; 2min 42s ago
Main PID: 128040 (vsftpd)
Tasks: 1 (limit: 22942)
Memory: 592.0K
CGroup: /system.slice/vsftpd.service
└─128040 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
Jun 17 01:55:50 linuxhelp systemd[1]: Starting Vsftpd ftp daemon...
Jun 17 01:55:50 linuxhelp systemd[1]: Started Vsftpd ftp daemon.
...skipping...
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor pre>
Active: active (running) since Sat 2023-06-17 01:55:50 IST; 2min 42s ago
Main PID: 128040 (vsftpd)
Tasks: 1 (limit: 22942)
Memory: 592.0K
CGroup: /system.slice/vsftpd.service
└─128040 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
Jun 17 01:55:50 linuxhelp systemd[1]: Starting Vsftpd ftp daemon...
Jun 17 01:55:50 linuxhelp systemd[1]: Started Vsftpd ftp daemon.
Step 6: Create user for FTP by using the below command
[root@linuxhelp ~]# useradd ftpuser1
Step 7: Set password for the ftpuser by using the below command
[root@linuxhelp ~]# passwd ftpuser1
Step 8: Add the ftpuser into userlist file by using the below command
[root@linuxhelp ~]# vim /etc/vsftpd/user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
ftpuser1
step 9: Edit the configuration file ensure the followings lines are uncomment by using the below command
[root@linuxhelp ~]# vim /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
userlist_deny=NO
step 10: Restart the vsftpd service by using the below command
[root@linuxhelp ~]# systemctl restart vsftpd
Step 11: Create some files in ftpuser home directory by using the below command
[root@linuxhelp ~]# touch /home/ftpuser1/abc{1..5}
Step 12: Check whether the client package is installed by using the below command
[root@linuxhelp ~]# rpm -q ftp
package ftp is not installed
step 13: Install the ftp package by using the below command
[root@linuxhelp ~]# yum install ftp
Last metadata expiration check: 2:22:40 ago on Friday 16 June 2023 11:44:48 PM IST.
Dependencies resolved.
===============================================================================
Package Architecture Version Repository Size
===============================================================================
Installing:
ftp x86_64 0.17-78.el8 ol8_appstream 70 k
Transaction Summary
===============================================================================
Install 1 Package
Total download size: 70 k
Installed size: 112 k
Is this ok [y/N]: y
Downloading Packages:
ftp-0.17-78.el8.x86_64.rpm 570 kB/s | 70 kB 00:00
-------------------------------------------------------------------------------
Total 554 kB/s | 70 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : ftp-0.17-78.el8.x86_64 1/1
Running scriptlet: ftp-0.17-78.el8.x86_64 1/1
Verifying : ftp-0.17-78.el8.x86_64 1/1
Installed:
ftp-0.17-78.el8.x86_64
Complete!
Step 14: Connect to the ftp server by using the below command
[root@linuxhelp ~]# ftp 192.168.6.136
Connected to 192.168.6.136 (192.168.6.136).
220 (vsFTPd 3.0.3)
Name (192.168.6.136:root): ftpuser1
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
Step 15: List the content by using the below command
ftp> ls
227 Entering Passive Mode (192,168,6,136,111,83).
150 Here comes the directory listing.
-rw-r--r-- 1 0 0 0 Jun 16 20:32 abc1
-rw-r--r-- 1 0 0 0 Jun 16 20:32 abc2
-rw-r--r-- 1 0 0 0 Jun 16 20:32 abc3
-rw-r--r-- 1 0 0 0 Jun 16 20:32 abc4
-rw-r--r-- 1 0 0 0 Jun 16 20:32 abc5
226 Directory send OK.
Step 16: Download the contents by using the below command
ftp> get abc1
local: abc1 remote: abc1
227 Entering Passive Mode (192,168,6,136,27,1).
150 Opening BINARY mode data connection for abc1 (0 bytes).
226 Transfer complete.
Step 17: Check the downloads by using the below command
ftp> !ls
abc1 Desktop Downloads Music Public Videos
anaconda-ks.cfg Documents initial-setup-ks.cfg Pictures Templates
step 18: Exit from the FTP
ftp> exit
221 Goodbye
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to install and configure vsftpd server on Oracle Linux 8.8. Your feedback is much welcome.
Comments ( 0 )
No comments available