top of page
Recent Posts

How To Install TFTP Server In Red Hat Enterprise Linux 7

We might need to install and configure TFTP (Trivial File Transfer Protocol) service. TFTP has may use cases and PXE (Preboot Execution Environment) Boot is one of the Use cases. Let start.

Step1: To Install Required Packages, e.g. tftp-server

# yum install tftp tftp-server* -y

Step2: To verify the tftp server configuration files.

#  cat /usr/lib/systemd/system/tftp.service 
Description=Tftp Server

ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot

Note: in.tftpd can have some additional options, e.g --secure, -s : Change root directory on startup; --create, -c: Allow new files to be created; --permissive, -p: Perform no additional permissions checks.
# man in.tftpd command will be shown more options available for this.
#  cat /usr/lib/systemd/system/tftp.socket 
Description=Tftp Server Activation Socket



Setp:3 To start the tftp server service

# systemctl start tftp.service
# systemctl is-active tftp.service

# systemctl enable tftp.service
# systemctl is-enabled tftp.service

# systemctl status tftp.service
tftp.service - Tftp Server
   Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
   Active: active (running) since Sat 2019-07-18 01:32:02 EDT; 30s ago
     Docs: man:in.tftpd
 Main PID: 5299 (in.tftpd)
    Tasks: 1
   Memory: 132.0K
   CGroup: /system.slice/tftp.service
           └─5299 /usr/sbin/in.tftpd -s /var/lib/tftpboot

Jul 18 01:32:02 systemd[1]: Started Tftp Server.

Setp:4 To verify tftp server service from the client

# tftp -V
tftp-hpa 5.2, with readline

# tftp
tftp> verbose
Verbose mode on.
tftp> get
getting from to [netascii]
Received 1300 bytes in 0.1 seconds [101954 bit/s]

tftp> put
putting to [netascii]
Error code 1: File not found
Note: The file is not exist in my tftp server and and didnt set --create, -c options to create a new file in the server as well.

Once I have created that file in the tftp server and have set the permission to write. after that I can upload the file, as below:

# touch /var/lib/tftpboot/ 
# chmod 777 /var/lib/tftpboot/ 

# tftp -v -c  put
Connected to (, port 69
putting to [netascii]
Sent 289 bytes in 0.0 seconds [237712 bit/s]to


1. If SElinux enabled with enforcing mode, we need to set SELinux boolean for the TFTP write, as below:

# setsebool -P tftp_anon_write 1
# setsebool -P tftp_home_dir 1

2. If Firewalld service is running in the system, we need to open the firewall port in the system to accept the incoming request at the TFTP server.

# firewall-cmd --zone=public --add-service=tftp --permanent
# firewall-cmd --reload

Hope this post will help.

3,809 views0 comments

Recent Posts

See All


Log In to Connect With Members
View and follow other members, leave comments & more.
bottom of page