天天看點

linux用tftp上傳不了檔案夾,Linux下tftp上傳檔案失敗的幾條原因

1.  Error code 0: Permission denied

主目錄沒有寫權限, 可以 chmod  0777  /var/lib/tftpboot

2.Error code 1: File not found

在/etc/xinetd.d/tftp配置檔案中,server_args後加上 -c 選項,方可上傳

service tftp

{

socket_type = dgram

protocol = udp

wait = yes

user = root

server = /usr/sbin/in.tftpd

server_args = -s /var/lib/tftpboot -c

disable = no

per_source = 11

cps = 100 2

flags = IPv4

}

3. Transfer timed out.

如果第1,2條都沒有問題,第3條可能是IPv6的原因,例如 在指令行下輸入

# tftp localhost

系統可能使用的是IPv6的 ::1 位址,如下WireShark截圖:

linux用tftp上傳不了檔案夾,Linux下tftp上傳檔案失敗的幾條原因

如果使用 # tftp 127.0.0.1  IPv4環回位址應該是沒有問題的。