Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #209535 > unrolled thread

tftp problem

Started byghe <ghe@slsware.net>
First post2019-06-02 21:50 +0200
Last post2019-06-28 08:50 +0200
Articles 13 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  tftp problem ghe <ghe@slsware.net> - 2019-06-02 21:50 +0200
    Re: tftp problem john doe <johndoe65534@mail.com> - 2019-06-03 07:50 +0200
      Re: tftp problem ghe <ghe@slsware.net> - 2019-06-03 15:30 +0200
        Re: tftp problem john doe <johndoe65534@mail.com> - 2019-06-03 16:10 +0200
          Re: tftp problem john doe <johndoe65534@mail.com> - 2019-06-03 16:50 +0200
          Re: tftp problem ghe <ghe@slsware.net> - 2019-06-03 17:50 +0200
            Re: tftp problem deloptes <deloptes@gmail.com> - 2019-06-03 19:50 +0200
              Re: tftp problem ghe <ghe@slsware.net> - 2019-06-03 20:40 +0200
                Re: tftp problem john doe <johndoe65534@mail.com> - 2019-06-04 07:50 +0200
                  Re: tftp problem ghe <ghe@slsware.net> - 2019-06-04 18:30 +0200
                    Re: tftp problem john doe <johndoe65534@mail.com> - 2019-06-04 19:40 +0200
                      Re: tftp problem ghe <ghe@slsware.net> - 2019-06-05 00:50 +0200
                        Re: tftp problem andreimpopescu@gmail.com - 2019-06-28 08:50 +0200

#209535 — tftp problem

Fromghe <ghe@slsware.net>
Date2019-06-02 21:50 +0200
Subjecttftp problem
Message-ID<y4EEp-1oa-1@gated-at.bofh.it>
buster, atftp, atftpd

atftpd writes to /srv/tftp, even when I change to /tftpboot in the
/etc/default config. Or, as is suggested in the man page, just leave
that part of the config empty. Restart doesn't impress it.

Nice piece of software, but I have to put a link in /srv to /tftpboot to
make it do what tftp is supposed to do. Anybody seen this? Or know how
to fix it?

Works fine, I just don't like it when I ask it to do something and I
have to create a little untidiness to make it happen...

Buglet? PEBCAK?

-- 
Glenn English

[toc] | [next] | [standalone]


#209543

Fromjohn doe <johndoe65534@mail.com>
Date2019-06-03 07:50 +0200
Message-ID<y4O13-7jf-1@gated-at.bofh.it>
In reply to#209535
On 6/2/2019 9:47 PM, ghe wrote:
> buster, atftp, atftpd
>
> atftpd writes to /srv/tftp, even when I change to /tftpboot in the
> /etc/default config. Or, as is suggested in the man page, just leave
> that part of the config empty. Restart doesn't impress it.
>
> Nice piece of software, but I have to put a link in /srv to /tftpboot to
> make it do what tftp is supposed to do. Anybody seen this? Or know how
> to fix it?
>

I assume that you have restarted the service?

--
John Doe

[toc] | [prev] | [next] | [standalone]


#209566

Fromghe <ghe@slsware.net>
Date2019-06-03 15:30 +0200
Message-ID<y4Vcd-3kx-1@gated-at.bofh.it>
In reply to#209543
On 6/2/19 11:46 PM, john doe wrote:

> I assume that you have restarted the service?

Yup. Several times on multiple computers. No joy.

I haven't, though, tried starting with the options added by hand...

-- 
Glenn English

[toc] | [prev] | [next] | [standalone]


#209569

Fromjohn doe <johndoe65534@mail.com>
Date2019-06-03 16:10 +0200
Message-ID<y4VOV-3My-3@gated-at.bofh.it>
In reply to#209566
On 6/3/2019 3:24 PM, ghe wrote:
> On 6/2/19 11:46 PM, john doe wrote:
>
>> I assume that you have restarted the service?
>
> Yup. Several times on multiple computers. No joy.
>
> I haven't, though, tried starting with the options added by hand...
>

$ atftpd --verbose=7 --daemon --no-fork --logfile /dev/stdout

Should hopefully help you figure out what's going on.

--
John Doe

[toc] | [prev] | [next] | [standalone]


#209573

Fromjohn doe <johndoe65534@mail.com>
Date2019-06-03 16:50 +0200
Message-ID<y4WrE-3ZB-13@gated-at.bofh.it>
In reply to#209569
On 6/3/2019 4:08 PM, john doe wrote:
> On 6/3/2019 3:24 PM, ghe wrote:
>> On 6/2/19 11:46 PM, john doe wrote:
>>
>>> I assume that you have restarted the service?
>>
>> Yup. Several times on multiple computers. No joy.
>>
>> I haven't, though, tried starting with the options added by hand...
>>
>
> $ atftpd --verbose=7 --daemon --no-fork --logfile /dev/stdout
>
> Should hopefully help you figure out what's going on.
>

Also, is your " [directory] must be a world readable/writable directories."?


Just after installing 'atftpd":

drwxr-xr-x 2 nobody root 4096 /srv/tftp

--
John Doe

[toc] | [prev] | [next] | [standalone]


#209577

Fromghe <ghe@slsware.net>
Date2019-06-03 17:50 +0200
Message-ID<y4XnH-4As-3@gated-at.bofh.it>
In reply to#209569
On 6/3/19 8:08 AM, john doe wrote:

> atftpd --verbose=7 --daemon --no-fork --logfile /dev/stdout

Response, run as root:
atftpd: can't bind port :69/udp

They're just kidding. I think -- I don't know what they mean by 'bind'.
I've saved configs over tftp from my Juniper firewall and my Cisco router.


Juniper a few minutes ago (small file; just beginning to get it going):

>  Save configurations (5213 bytes) to SSG140Config.txt on TFTP server
192.168.2.3 from ethernet0/7.
> !!!!!!!!!!!!!!!!!!!!!!!!
> tftp transferred records = 11
> tftp success!
>
> TFTP Succeeded

ghe@sbox:~$ ls -lh /tftpboot/ | egrep SSG
-rw-rw-rw- 1 nobody nogroup 5.1K Jun  3 08:48 SSG140Config.txt


Cisco (bigger file; my border router):

> !!!!
> 12386 bytes copied in 0.584 secs (21209 bytes/sec)

(Cisco makes '.'s instead of '!'s on failure.)

ghe@sbox:~$ ls -lh /tftpboot/ | egrep Run
-rw-rw-rw- 1 nobody nogroup  13K Jun  3 08:51 brouterRunningConfig.txt


Those two have been known to be picky. And, as far as I know, there's no
way to get them to use anything but port 69.

I've also tftp'ed files locally, using atftp.

...

> Also, is your " [directory] must be a world readable/writable
directories."?

ghe@sbox:~$ ls -lh / | egrep tftp
drwxrwxrwx   2 nobody root    4.0K Jun  2 16:00 tftpboot

...

> drwxr-xr-x 2 nobody root 4096 /srv/tftp

Right now, /srv/tftp is a link to /tftpboot, so it's 777:

ghe@sbox:~$ ls -lh /srv | egrep tftp
lrwxrwxrwx 1 root root      10 May 31 13:04 tftp -> /tftpboot/

It's owned by root, but it was nobody's when it was a dir (worked just
fine then, anyway). And there seems to be no problem with the link being
owned by root.

-- 
Glenn English

[toc] | [prev] | [next] | [standalone]


#209581

Fromdeloptes <deloptes@gmail.com>
Date2019-06-03 19:50 +0200
Message-ID<y4ZfP-5J2-1@gated-at.bofh.it>
In reply to#209577
ghe wrote:

> Response, run as root:
> atftpd: can't bind port :69/udp
> 

why do you have /udp after the port? Check the config

> They're just kidding. I think -- I don't know what they mean by 'bind'.
> I've saved configs over tftp from my Juniper firewall and my Cisco router.

This usually means that the process can start listening on that port

[toc] | [prev] | [next] | [standalone]


#209583

Fromghe <ghe@slsware.net>
Date2019-06-03 20:40 +0200
Message-ID<y502e-6f5-7@gated-at.bofh.it>
In reply to#209581
On 6/3/19 11:48 AM, deloptes wrote:

>> Response, run as root:
>> atftpd: can't bind port :69/udp
>>
> 
> why do you have /udp after the port? Check the config

1) I don't; atftpd put it there. TFTP is UDP on port 69, isn't it?

2) What config? The closest thing to a config I could find was
/etc/default/atftpd. And it looked to me like it was ignoring that.

>> They're just kidding. I think -- I don't know what they mean by 'bind'.
>> I've saved configs over tftp from my Juniper firewall and my Cisco router.
> 
> This usually means that the process can start listening on that port

But if it means it can start listening, why say anything about it? They
didn't tell me the sky is blue.

And why not say any more? I was hoping for some useful info about what
was wrong.


I went into the startup script in init.d, hung a '.sh' on the filename,
added some debugging echo statements, and commented out what I suspected
was be making the script not print any of the echos.

When I ran the file as a shell script, it chatted a bit. And most most
importantly, the daemon started and it started writing into the correct
directory. I need to see if I can get the s.*d word to do that.

Thanks folks. You've given me info on a direction to go with this.

-- 
Glenn English

[toc] | [prev] | [next] | [standalone]


#209597

Fromjohn doe <johndoe65534@mail.com>
Date2019-06-04 07:50 +0200
Message-ID<y5auB-4vK-1@gated-at.bofh.it>
In reply to#209583
On 6/3/2019 8:39 PM, ghe wrote:
> On 6/3/19 11:48 AM, deloptes wrote:
>
>>> Response, run as root:
>>> atftpd: can't bind port :69/udp
>>>
>>
>> why do you have /udp after the port? Check the config
>
> 1) I don't; atftpd put it there. TFTP is UDP on port 69, isn't it?
>

Because in the command I gave in this thread '--port' option was missing.

$ atftpd --port 2345 --verbose=7 --daemon --no-fork --logfile
/dev/stdout [DIRECTORY]

Port 69 UDP on the server and is also the destination port on the clients.

> 2) What config? The closest thing to a config I could find was
> /etc/default/atftpd. And it looked to me like it was ignoring that.
>

As far as I can tell, there is no config file per say but the init.d
script will use the file '/etc/default/atftp'.

>>> They're just kidding. I think -- I don't know what they mean by 'bind'.

'Bind' means use this adress only.

> When I ran the file as a shell script, it chatted a bit. And most most
> importantly, the daemon started and it started writing into the correct
> directory. I need to see if I can get the s.*d word to do that.
>

's.*d'?

--
John Doe

[toc] | [prev] | [next] | [standalone]


#209603

Fromghe <ghe@slsware.net>
Date2019-06-04 18:30 +0200
Message-ID<y5ktY-2lk-5@gated-at.bofh.it>
In reply to#209597
On 6/3/19 11:39 PM, john doe wrote:


> 'Bind' means use this adress only.

Thanks. It means different things in different contexts. Wasn't sure
about this one.

> 's.*d'?

That was intended to be a joke -- a regex for systemd. I thought this
list would recognize it. Sorry. (atftpd's working now, BTW.)

-- 
Glenn English

[toc] | [prev] | [next] | [standalone]


#209604

Fromjohn doe <johndoe65534@mail.com>
Date2019-06-04 19:40 +0200
Message-ID<y5lzI-2Xq-9@gated-at.bofh.it>
In reply to#209603
On 6/4/2019 6:27 PM, ghe wrote:
> On 6/3/19 11:39 PM, john doe wrote:
>
>
>> 'Bind' means use this adress only.
>
> Thanks. It means different things in different contexts. Wasn't sure
> about this one.
>
>> 's.*d'?
>
> That was intended to be a joke -- a regex for systemd. I thought this
> list would recognize it. Sorry. (atftpd's working now, BTW.)
>

Always interesting to learn something new!!! :)


Do you mind sharing how you get it sorted out?

--
John Doe

[toc] | [prev] | [next] | [standalone]


#209613

Fromghe <ghe@slsware.net>
Date2019-06-05 00:50 +0200
Message-ID<y5qpH-5UP-1@gated-at.bofh.it>
In reply to#209604
On 6/4/19 2:03 PM, ghe wrote:

Sorry Mr Doe. Pressed the wrong button and sent to you instead of the
list...

> On 6/4/19 11:32 AM, john doe wrote:
> 
>> Do you mind sharing how you get it sorted out?

> Not at all. This 'trivial' software wasn't at all trivial for me to set
> up properly -- lots of confusion, wrong assumptions, and futzing. Much
> more trouble than configuring Cisco's (thoroughly documented) IOS...
> 
> So, and IIRC,
> 
> When I installed, it didn't show up in ps, but it was there when I tried
> to get it to save a file. I think it must have been in inetd. I was
> expecting it to be a daemon by default.
> 
> And it was writing to /srv/tftp (as per the inetd config that I didn't
> know existed). That took a bit of thinking, since I'd always thought
> TFTP used /tftpboot. And I'd never heard of /srv/tftp. Some surfing the
> web found useful info about that.
> 
> When I replaced its tftp dir in /srv with a link to /tftpboot, it
> started writing to where I expected it to.
> 
> I edited its config file (/etc/default/atftpd) to point it at /tftpboot
> and not to use inetd, but a restart of the server didn't seem to make
> any difference. Rebooting the computer did, though, and it showed up in
> ps with the options I'd written in the config.
> 
> The program (as a daemon), systemd, my router, my firewall, and I are
> all happy now.
> 
> It might be an idea for somebody to add a bit more info to the man page,
> and/or the web site, to explain just what needs to happen to make this
> go. It's pretty straightforward when you know its secrets and gotchas.
> 
> It might also be nice if systemd wouldn't ignore the echo commands in
> the init shell script -- some of them have been put there to try to
> figure why something's not working.

-- 
Glenn English

[toc] | [prev] | [next] | [standalone]


#210447

Fromandreimpopescu@gmail.com
Date2019-06-28 08:50 +0200
Message-ID<ydSRP-oq-1@gated-at.bofh.it>
In reply to#209613

[Multipart message — attachments visible in raw view] — view raw

On Ma, 04 iun 19, 16:45:39, ghe wrote:
> > 
> > 
> > I edited its config file (/etc/default/atftpd) to point it at /tftpboot
> > and not to use inetd, but a restart of the server didn't seem to make
> > any difference. Rebooting the computer did, though, and it showed up in
> > ps with the options I'd written in the config.

"restarting the server" usually means restarting the whole system, you 
probably meant "service" here?

How were you restarting it (the service)?
 
> > It might also be nice if systemd wouldn't ignore the echo commands in
> > the init shell script -- some of them have been put there to try to
> > figure why something's not working.

Maybe you weren't looking into the right place?

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web