XPost: uk.comp.os.linux   
   From: java@evij.com.invalid   
      
   On 2025-05-16 13:36, Theo wrote:   
   >   
   > 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:*   
      
   There's no such line.   
      
   > Do ps/etc show that xinetd is running?   
      
   Yes xinetd is running ...   
      
   user@Computer:/home$ ps -aux | grep -v grep | grep xinetd   
   root 1061 0.0 0.0 9796 2564 ? Ss 16:47 0:00   
   /usr/sbin/xinetd -pidfile /run/xinetd.pid -stayalive -inetd_compat   
   -inetd_ipv6   
      
   ... but ...   
      
   > Does 'ss -lp' show xinetd listening on any sockets?   
      
   ... that finds nothing ...   
      
   user@Computer:/home$ ss -lp | grep xinetd   
   user@Computer:/home$   
      
   >> 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,   
      
   No its straight tftp, as in ...   
      
   user@Computer:/home$ apt search tftp   
   [...]   
   tftp/jammy,now 0.17-23ubuntu1 amd64 [installed]   
    Trivial file transfer protocol client   
   [...]   
   tftpd/jammy,now 0.17-23ubuntu1 amd64 [installed]   
    Trivial file transfer protocol server   
   [...]   
      
   > It will however do this behaviour even to a nonexistent tftp server:   
      
   Yes, the error messages are useless for determining what is going wrong.   
      
   > I think you can tell xinetd to log incoming connections, ie times it started   
   > up in.tftpd - it may already do that. Check logs.   
      
   That's odd, I've not changed anything since this morning, except that I   
   shut down the PC when I went out for a walk, but the behaviour has   
   changed slightly since then:   
      
   user@Computer:/home$ tftp localhost   
   tftp> get test.txt   
   Transfer timed out.   
      
   tftp> q   
      
   ... resulting in a 0-length file in my home folder, and now when I check   
   syslog, whereas previously it had been unhelpfully free of anything   
   relevant, now I see the following 5 times ...   
      
   May 16 17:17:09 Computer xinetd[1991]: execv( /usr/sbin/tcpd ) failed:   
   No such file or directory (errno = 2)   
      
   ... and indeed the following doesn't find tcpd anywhere at all on the   
   system partition:   
      
   user@Computer:/home$ sudo find / -xdev -name tcpd   
      
   --   
      
   Fake news kills!   
      
   I may be contacted via the contact address given on my website:   
   www.macfh.co.uk   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|