TFTP文件传输错误求助:sbin目录缺失in.tftpd文件的解决方法
Hey there, let's work through this TFTP issue together—missing in.tftpd in /sbin is a common hiccup, but we can fix it easily!
First, let's double-check that the file is actually missing. Run these commands in your terminal to confirm:
ls /sbin/in.tftpd which in.tftpd
If both come back empty, here are the steps to resolve it:
Reinstall the TFTP server package
The exact package name depends on your Linux distribution:- For Debian/Ubuntu-based systems:
sudo apt remove --purge tftpd-hpa sudo apt update && sudo apt install tftpd-hpa - For CentOS/RHEL-based systems:
sudo yum remove tftp-server sudo yum install tftp-server
Reinstalling ensures that all required files (including
in.tftpd) are restored to their correct locations.- For Debian/Ubuntu-based systems:
If
in.tftpdis installed but in a different directory
Sometimes the binary might be placed in/usr/sbininstead of/sbin. Check with this command:dpkg -L tftpd-hpa # For Debian/Ubuntu rpm -ql tftp-server # For CentOS/RHELIf you find
in.tftpdin/usr/sbin, create a symbolic link to/sbinto fix the path issue:sudo ln -s /usr/sbin/in.tftpd /sbin/in.tftpdVerify and restart the TFTP service
After reinstalling or creating the link, make sure the service is running properly:- Debian/Ubuntu:
sudo systemctl restart tftpd-hpa sudo systemctl status tftpd-hpa - CentOS/RHEL:
sudo systemctl restart xinetd # Or tftp service depending on your setup sudo systemctl status xinetd
Also, double-check your TFTP configuration file (like
/etc/default/tftpd-hpafor Ubuntu or/etc/xinetd.d/tftpfor CentOS) to ensure the server path and root directory are correctly set.- Debian/Ubuntu:
Check directory permissions
Don't forget to make sure your TFTP root directory (usually/var/lib/tftpboot) has the right permissions so clients can transfer files:sudo chmod 777 /var/lib/tftpboot
Give these steps a try, and your TFTP file transfers should start working again!
备注:内容来源于stack exchange,提问作者Dhruba Sharma

