Fala pessoal, estou com uma dúvida sobre o tftpd. Estou usando Debian sarge, e instalei o daemon do tftp via apt-get. Bom, verifiquei que o tftpd roda sobre o inetd, desta forma, verificando o inetd.conf posso ver isso:
Código :#:BOOT: Tftp service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd -s /tftpboot
quando vou verificar as portas abertas no meu server, identifico:
ou seja, a porta 69, está sendo escutada.Código :marcello@pink:~$ netstat -a | grep tftp udp 0 0 *:tftp *:*
Bom, meu problema eh que eu não consigo colocar arquivos no server. Mas consigo dar um "get" em um arquivo que tenha sido colocado lá pelo admin do server.
verifiquei o syslog encontrei isso:
usando o tehtereal no server tftpd quando rodo o cliente tftpCódigo :# quando dei um GET num arquivo: Jul 5 11:26:13 pink in.tftpd[29868]: connect from <ip_cliente> Jul 5 11:26:13 pink tftpd[29869]: tftpd: trying to get file: teste Jul 5 11:26:13 pink tftpd[29869]: tftpd: serving file from /tftpboot # Quando dei um PUT arquivo: Jul 5 11:26:21 pink in.tftpd[29870]: connect from <ip_cliente> Jul 5 11:26:21 pink tftpd[29871]: tftpd: trying to get file: matricula Jul 5 11:26:21 pink tftpd[29871]: tftpd: serving file from /tftpboot
Código :# quando dei um GET num arquivo: root@pink:~# tethereal -n udp and host <ip_cliente> Capturing on eth0 0.000000 <ip_cliente> -> <ip_server> TFTP Read Request, File: teste, Transfer type: netascii 0.015910 <ip_server> -> <ip_cliente> UDP Source port: 49720 Destination port: 32832 0.016776 <ip_cliente> -> <ip_server> TFTP Acknowledgement, Block: 1 5.006521 <ip_server> -> <ip_cliente> UDP Source port: 49720 Destination port: 32832 # quando dei um PUT num arquivo: 251.692019 <ip_cliente> -> <ip_server> TFTP Write Request, File: matricula, Transfer type: netascii 251.707279 <ip_server> -> <ip_cliente> UDP Source port: 49721 Destination port: 32832 292.923548 <ip_cliente> -> <ip_server> TFTP Write Request, File: nagios, Transfer type: netascii 292.938685 <ip_server> -> <ip_cliente> TFTP Error Code, Code: File not found, Message: File not found
to ficando stressado com isso .. tipo, na configuraćão do inetd.conf já mudei o user de nobody para root e nada ... alguém saberia explicar????
Ps.: vale lembrar que eu tenho certeza que o arquivo existe no diretório estaja quando abri o cliente tftp!