1: sudo apt-Get install tftp tftpd OpenBSD-inetd
In particular, netkit-inetd is used in many articles, but it is found that
This software is not available. We use OpenBSD-inetd, which has good experimental results.
2: Create a folder named tftpboot in the root directory.
CD/
Sudo mkdir tftpboot creates a folder
Sudo chmod 777 tftpboot change folder Permissions
3: Modify sudo gedit/etc/inetd. conf as follows:
TFTP dgram udp wait nobody/usr/sbin/tcpd
/Usr/sbin/in. tftpd/tftpboot
4: Modify sudo gedit/etc/xinetd. d/TFTP to the following format (if there is no TFTP file, create it)
Service tftp
{
Disable = No
Socket_type = dgram
Protocol = UDP
Wait = Yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-S/tftpboot-C
Source = 11
CPIs = 100 2
}
5: Modify sudo gedit/etc/default/tftpd-HPA as follows:
Run_daemon = "no"
Options = "-S/tftpboot-C-p-u tftpd"
6: sudo/etc/init. d/OpenBSD-inetd reload
Sudo/etc/init. d/xinetd restart
Sudo in. tftpd-L/tftpboot
7. Create a test file aaa in the tftpboot folder.
CD/tftpboot
Sudo touch aaa
Sudo chmod 777 aaa
9: start testing the TFTP service
CD/home
TFTP 192.168.186.100
GET/tftpboot/AAA
If no error code is displayed and the AAA file is displayed in the home directory, TFTP
Service created
Note: 1: If a permission denied error occurs, the operator has insufficient permissions,
Privilege Escalation required
Su Root
After the password is entered, TFTP transmission can be performed normally.
2: If an access violation error occurs, the file permission is not unlocked,
You can unlock all the file operation permissions you want to perform.
Chmod 777 file name