• Re: atftpd permission denied

    From Dan Ritter@21:1/5 to Timothy M Butterworth on Fri Apr 11 01:40:01 2025
    Timothy M Butterworth wrote:
    All,

    I am having problems writing to atftpd. I keep getting a permission denied error.

    Switch#$.SED.bin tftp://169.254.180.65/c3550-ipservicesk9-mz.122-25.SED.bin


    Address or name of remote host [169.254.180.65]?
    Destination filename [c3550-ipservicesk9-mz.122-25.SED.bin]?
    !
    TFTP: error code 2 received - Access violation

    %Error writing tftp://169.254.180.65/c3550-ipservicesk9-mz.122-25.SED.bin (Permission denied)..

    TFTP is of very limited use; it's normally used only to retrieve
    smallish boot files.

    I'm pretty sure atftpd does not allow files to be written at
    all.

    The standard tftpd defaults to the same behavior, but can be
    passed a -c flag to allow a file to be written. I wouldn't
    recommend it.

    Why are you trying to do this? Normally a client requests a file
    from the tftpd server; it doesn't push anything.

    -dsr-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Titus Newswanger@21:1/5 to Timothy M Butterworth on Fri Apr 11 04:20:01 2025
    This is a multi-part message in MIME format.
    On 4/10/25 18:49, Timothy M Butterworth wrote:

    I am trying to copy a Cisco IOS image from a switch so I can push it
    to another switch.

    Sounds like the type of application where I tend to use scp. Would that
    do the job? Or maybe I misunderstood your question.

    needs ssh access on remote device for this to work

    push a file from cwd to 169.254.180.65:

    me@debian:~$ scp myfile.bin [email protected]:/home/me/myfile.bin

    pull a file from 169.254.180.65 to cwd:

    me@debian:~$ scp [email protected]:/home/me/myfile.bin myfile.bin



    --
    ⢀⣴⠾⠻⢶⣦⠀
    ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
    ⠈⠳⣄⠀⠀

    --

    Titus Newswanger
    Curtiss WI

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 4/10/25 18:49, Timothy M Butterworth
    wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAO6YxPy+7SPYn2QYs9o4Wn2eVPS616pxhkUWeCW8dstmO1eCzA@mail.gmail.com">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <div dir="ltr">
    <div dir="ltr"><br>
    </div>
    <div class="gmail_quote gmail_quote_container">
    <div>I am trying to copy a Cisco IOS image from a switch so I
    can push it to another switch.</div>
    <div><br>
    </div>
    </div>
    </div>
    </blockquote>
    <p>Sounds like the type of application where I tend to use scp.
    Would that do the job? Or maybe I misunderstood your question.</p>
    <p>needs ssh access on remote device for this to work<br>
    </p>
    <p>push a file from cwd to 169.254.180.65:<br>
    </p>
    <p>me@debian:~$ scp myfile.bin <a class="moz-txt-link-abbreviated" href="mailto:[email protected]:/home/me/myfile.bin">[email protected]:/home/me/myfile.bin</a></p>
    <p>pull a file from 169.254.180.65 to cwd:</p>
    <p>me@debian:~$ scp <a class="moz-txt-link-abbreviated" href="mailto:[email protected]:/home/me/myfile.bin">[email protected]:/home/me/myfile.bin</a> myfile.bin</p>
    <blockquote type="cite" cite="mid:CAO6YxPy+7SPYn2QYs9o4Wn2eVPS616pxhkUWeCW8dstmO1eCzA@mail.gmail.com">
    <div dir="ltr">
    <div><br clear="all">
    </div>
    <div><br>
    </div>
    <span class="gmail_signature_prefix">-- </span><br>
    <div dir="ltr" class="gmail_signature">
    <div dir="ltr"><span style="color:rgb(34,34,34)">⢀⣴⠾⠻⢶⣦⠀</span><br
    style="color:rgb(34,34,34)">
    <span style="color:rgb(34,34,34)">⣾⠁⢠⠒⠀⣿⡁ Debian - The
    universal operating system</span><br
    style="color:rgb(34,34,34)">
    <span style="color:rgb(34,34,34)">⢿⡄⠘⠷⠚⠋⠀ </span><a
    href="https://www.debian.org/" rel="noreferrer"
    style="color:rgb(17,85,204)" target="_blank"
    moz-do-not-send="true" class="moz-txt-link-freetext">https://www.debian.org/</a><br
    style="color:rgb(34,34,34)">
    <span style="color:rgb(34,34,34)">⠈⠳⣄⠀⠀</span><br>
    </div>
    </div>
    </div>
    </blockquote>
    <pre class="moz-signature" cols="72">--

    Titus Newswanger
    Curtiss WI</pre>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Ritter@21:1/5 to Timothy M Butterworth on Fri Apr 11 12:40:01 2025
    Timothy M Butterworth wrote:
    On Thu, Apr 10, 2025 at 7:14 PM Dan Ritter <[email protected]> wrote:

    Timothy M Butterworth wrote:
    All,

    I am having problems writing to atftpd. I keep getting a permission
    denied
    error.

    Switch#$.SED.bin tftp://
    169.254.180.65/c3550-ipservicesk9-mz.122-25.SED.bin


    Address or name of remote host [169.254.180.65]?
    Destination filename [c3550-ipservicesk9-mz.122-25.SED.bin]?
    !
    TFTP: error code 2 received - Access violation

    %Error writing tftp://
    169.254.180.65/c3550-ipservicesk9-mz.122-25.SED.bin
    (Permission denied)..

    TFTP is of very limited use; it's normally used only to retrieve
    smallish boot files.

    I'm pretty sure atftpd does not allow files to be written at
    all.

    The standard tftpd defaults to the same behavior, but can be
    passed a -c flag to allow a file to be written. I wouldn't
    recommend it.

    Why are you trying to do this? Normally a client requests a file
    from the tftpd server; it doesn't push anything.


    I am trying to copy a Cisco IOS image from a switch so I can push it to another switch.

    I tried testing atftpd with the atftp client as show below:

    tmb@debian-hp:~$ atftp
    tftp> connect 127.0.0.1
    tftp> put atftp-test.txt
    tftp: error received from server <Access violation>
    tftp: aborting

    Yeah, don't do that.

    Use the tftp client from your debian box to pull the image from
    the switch to the debian box -- in your home or other definitely
    writable location.

    Move the image to your tftpd's directory.

    Pull the image to the switch via the switch's tftp client.

    -dsr-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Timothy M Butterworth on Fri Apr 11 17:40:01 2025
    On Thu, Apr 10, 2025 at 06:11:31PM -0400, Timothy M Butterworth wrote:
    I am having problems writing to atftpd. I keep getting a permission denied >error.

    It sounds like you've worked around this, but I'll note for future
    searchers that the reason for this is that atftpd is configured with DynamicUser=yes. One effect of this is that the process cannot write to
    any file. If you want the ability to upload via atftpd you'd need to
    systemctl edit atftpd.service
    and add
    [Service]
    DynamicUser=no
    Note that this will cause atftpd to run as root, and you'd almost
    certainly want to also create a tftpd user and add User= and
    Group= lines.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Timothy M Butterworth on Sat Apr 12 03:00:01 2025
    On Fri, Apr 11, 2025 at 05:49:28PM -0400, Timothy M Butterworth wrote:
    Do you know if there is a setting in VSFTPD to upload files?

    /etc/vsftpd.conf:

    write_enable=YES

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)