Ubuntutftp service installation and configuration
1. Install related software packages: Ubuntu tftp (server), tftp (client), and xinetd
sudo apt-get install tftpd tftp xinetd
2. Create a configuration file
Create a configuration file tftp under/etc/xinetd. d/
sudo vim tftp
Enter the following content in the file:
service tftp{ socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4}
Save and exit
3. Create the Ubuntu tftp service file directory (where files are uploaded and downloaded) and change its permissions.
sudo mkdir /tftpbootsudo chmod 777 /tftpboot -R
4. Restart the service
sudo /etc/init.d/xinetd restart
Now that the Ubuntu tftp service has been installed, you can test it. (Assume there is a test file test.txt in the current directory)
$tftp 127.0.0.1 tftp> put test.txtSent 1018 bytes in 0.0 secondstftp> get test.txtReceived 1018 bytes in 0.1 secondstftp> quit
If a tftp Error on server: Access violation Error occurs, generate a file with the same name as the file to be uploaded in the/tftpboot directory and change the permission to 777.
touch test.txtchmod 777 test.txt