XPost: uk.comp.os.linux   
   From: theom+news@chiark.greenend.org.uk   
      
   In uk.comp.os.linux Java Jive wrote:   
   > As per title, I can get neither tftp or tftpd - at least I think   
   > neither but it's difficult to be sure - to work under Ubuntu 22. After   
   > some initial difficulties, I decided to uninstall and reinstall. Upon   
   > reinstallation, I received a warning that the file '/etc/inetd.conf' did   
   > not exist so I uninstalled them both again, 'touch'ed to create an empty   
   > '/etc/inetd.conf', and then reinstalled again, this time without undue   
   > warnings. The two config files now read as follows ...   
   [snip]   
   > May 16 11:37:42 Computer xinetd[1945]: added service tftp   
   > [file=/etc/inetd.conf] [line=1]   
   > May 16 11:37:42 Computer xinetd[1945]: 2.3.15.3 started with libwrap   
   > loadavg labeled-networking options compiled in.   
   > May 16 11:37:42 Computer xinetd[1945]: Started working: 2 available services   
      
   OK, so xinetd is running and has seen your tftp config file.   
      
   > ... but no listener is found on port 69 ...   
   >   
   > user@Computer:/home$ netstat -na | grep LIST | grep 69   
   > unix 2 [ ACC ] STREAM LISTENING 9169   
   > /var/run/samba/nmbd/unexpected   
      
   It's udp so it won't have a LISTEN state. I would expect a line similar to:   
      
   udp 0 0 0.0.0.0:69 0.0.0.0:*   
      
   > ... and generally there is no evidence of any tftp service actually   
   > running, for example ...   
      
   There is no tftp service. xinetd is doing the listening. When it sees an   
   incoming connection it starts the in.tftpd binary and hands the file   
   descriptor (I think) over to it. So every incoming connection starts a new   
   in.tftpd instance. Until that happens in.tftpd isn't running.   
      
   > user@Computer:/home$ ps -aux | grep -v grep | grep tftp   
   > user@Computer:/home$ systemctl list-units --no-pager | grep tftp   
   > user@Computer:/home$ sudo service --status-all | grep tftp   
   >   
   > ... all find nothing. Unsurprisingly therefore, when I try to set up a   
   > test, nothing works ...   
      
   Do ps/etc show that xinetd is running?   
   Does 'ss -lp' show xinetd listening on any sockets?   
      
   > user@Computer:/home$ sudo echo "This is a TFTP test from $(hostname)" >   
   > /home/tftpboot/test.txt   
   > user@Computer:/home$ sudo chown nobody:nogroup /home/tftpboot/test.txt   
   > user@Computer:/home$ ll /home/tftpboot/test.txt   
   > -rw-r--r-- 1 nobody nogroup 36 2025-05-15 21:43 /home/tftpboot/test.txt   
   > user@Computer:/home$ cat /home/tftpboot/test.txt   
   > This is a TFTP test from Computer   
   > user@Computer:/home$ tftp localhost   
   > tftp> get test.txt   
   > tftp: test.txt: Permission denied   
   > tftp> q   
      
   Assuming this is tftp-hpa, you could try 'status', 'verbose' and 'trace'   
   commands to give more logs.   
      
   It will however do this behaviour even to a nonexistent tftp server:   
      
   $ tftp example.com   
   tftp> verbose   
   Verbose mode on.   
   tftp> status   
   Connected to example.com.   
   Mode: netascii Verbose: on Tracing: off Literal: off   
   Rexmt-interval: 5 seconds, Max-timeout: 25 seconds   
   tftp> trace   
   Packet tracing on.   
   tftp> get nonexistent.txt   
   getting from example.com:nonexistent.txt to nonexistent.txt [netascii]   
   sent RRQ    
   sent RRQ    
   sent RRQ    
   ^C   
      
   > Using 127.0.0.1 instead of localhost suffers the same fate, as does an   
   > attempt to get a similar test text file from one of the Zyxel NSA221   
   > NASs, as does an attempt for a non-existent file or a non-existent   
   > server, so the error given could mean almost any type of failure and I   
   > don't know whether I have one problem with the client on the Ubuntu PC,   
   > or two problems with the service on each machine, PC and NAS, or all   
   > three. I was going to install the windows TFTP client to test with   
   > that, but for some reason or other that failed, and there's nothing in   
   > the event logs to suggest why, so for the moment I'm stuck.   
      
   I think you can tell xinetd to log incoming connections, ie times it started   
   up in.tftpd - it may already do that. Check logs.   
      
   Last time I set up tftp and had troubles it turned out it was ufw blocking   
   connections, but it seems you don't have ufw enabled. But I would guess a   
   similar networking cause.   
      
   Theo   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|