• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

FTP PWD issue

Scheduled Pinned Locked Moved Solved
Firmware wishlist
3
15
551
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    AndMaz
    last edited by AndMaz 2 Jul 2023, 14:13 7 Feb 2023, 12:22

    Hi

    It seems that FTP server responds with an empty string when I cd into a dir then cdup back to parent dir and then execute pwd

    A proper response should include /. This issue breaks my FTP client

    Update I can also repro the issue in FileZilla. Here are the logs

    12:02:00 Status: Logged in
    12:02:00 Status: Retrieving directory listing...
    12:02:02 Status: Directory listing of "/" successful
    12:02:06 Status: Retrieving directory listing of "/backup"...
    12:02:09 Status: Directory listing of "/backup" successful
    12:02:13 Status: Retrieving directory listing of "/"...
    12:02:13 Command: CWD /
    12:02:13 Response: 250 Directory successfully changed.
    12:02:13 Command: PWD
    12:02:13 Response: 257 ""
    12:02:13 Error: Server returned empty path.
    undefined 1 Reply Last reply 7 Feb 2023, 13:06 Reply Quote 0
    • undefined
      dc42 administrators @AndMaz
      last edited by 7 Feb 2023, 13:06

      @AndMaz thanks for reporting this. Can you point me to where in the FTP protocol specification it says that the response should be "/" ? I looked in RFC959 but didn't find it.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      undefined 1 Reply Last reply 7 Feb 2023, 14:12 Reply Quote 0
      • undefined
        AndMaz @dc42
        last edited by AndMaz 2 Jul 2023, 14:14 7 Feb 2023, 14:12

        @dc42 thanks you for quick answer.

        I can't point to exact place in RFC959 where it states that root is / but empty string as PWD doesn't seem to be correct. I mean, the working dir can't be empty. In Unix-like systems the root directory is denoted by the / sign.

        Initially I assumed that the problem came from my FTP client but the issue also happens in FileZilla, that implements all the FTP-related RFCs properly (at least I hope so)

        undefined 1 Reply Last reply 7 Feb 2023, 15:40 Reply Quote 0
        • undefined
          dc42 administrators @AndMaz
          last edited by dc42 2 Jul 2023, 15:42 7 Feb 2023, 15:40

          @AndMaz I've just tested FileZilla with two Duets:

          b31ec7e6-b3b0-4041-b9dd-0b5651ffc55d-image.png

          So it appears to be returning "/". Wireshark confirms this.

          Which version of RRF are you running?

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          undefined 2 Replies Last reply 7 Feb 2023, 15:46 Reply Quote 0
          • undefined
            AndMaz @dc42
            last edited by AndMaz 2 Jul 2023, 15:47 7 Feb 2023, 15:46

            @dc42 I'm using 3.4.2.

            What version did you use during your tests?

            undefined 2 Replies Last reply 7 Feb 2023, 15:57 Reply Quote 0
            • undefined
              dc42 administrators @AndMaz
              last edited by 7 Feb 2023, 15:57

              @AndMaz I am using 3.5beta but I don't think anything has changed in that area. I can re-test using 3.4.5 tomorrow,

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • undefined
                dc42 administrators @AndMaz
                last edited by 7 Feb 2023, 16:22

                @AndMaz I just tested it using 3.4.5 on one of the machines, and it still works.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                undefined 1 Reply Last reply 7 Feb 2023, 16:28 Reply Quote 0
                • undefined
                  AndMaz @dc42
                  last edited by 7 Feb 2023, 16:28

                  @dc42 thank you. I guess that I bumping firmware version will solve it

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    AndMaz @dc42
                    last edited by 7 Feb 2023, 16:30

                    @dc42 BTW in your tests did you cd into some dir then cdup? I'm asking this because the pwd right after connecting works properly, i.e., no bug

                    undefined 1 Reply Last reply 7 Feb 2023, 18:35 Reply Quote 0
                    • undefined
                      dc42 administrators @AndMaz
                      last edited by 7 Feb 2023, 18:35

                      @AndMaz I managed to provoke this twice by doing CDUP and then selecting the root:

                      665140e9-8f24-464a-bf24-8d60b0715e91-image.png

                      I will fix it in RRF 3.5beta3 and 3.4.6.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      undefined 1 Reply Last reply 9 Feb 2023, 15:12 Reply Quote 0
                      • undefined
                        AndMaz @dc42
                        last edited by AndMaz 2 Sept 2023, 15:13 9 Feb 2023, 15:12

                        @dc42 thank you for 🙂 https://github.com/Duet3D/RepRapFirmware/commit/f5fa23c3fd9eab9dc97cbefe317c3b0ee31cdf71

                        Unrelated Is is possible to add a recursiveDelete (default to false) to GET /rr_delete ? At the moment it's doesn't seem to be possible to remove a dir if it contains something inside. I would like to avoid overloading HTTP server with a bunch of delete reqs.

                        0 dc42 committed 9 Feb 2023, 08:19 to Duet3D/RepRapFirmware
                        Fix for FTP change to root directory (included in 3.5beta2 release)
                        undefined 1 Reply Last reply 9 Feb 2023, 18:10 Reply Quote 0
                        • undefined T3P3Tony moved this topic from General Discussion 9 Feb 2023, 18:10
                        • undefined
                          T3P3Tony administrators @AndMaz
                          last edited by 9 Feb 2023, 18:10

                          @AndMaz I have moved this to the firmware wishlist and that is a new feature.

                          www.duet3d.com

                          undefined 1 Reply Last reply 10 Feb 2023, 12:55 Reply Quote 0
                          • undefined
                            AndMaz @T3P3Tony
                            last edited by 10 Feb 2023, 12:55

                            @T3P3Tony thank you. Do you want me to create a dedicated ticket for this?
                            (This started as a FTP issue but then ended with a HTTP feature request)

                            undefined 1 Reply Last reply 10 Feb 2023, 13:04 Reply Quote 0
                            • undefined
                              T3P3Tony administrators @AndMaz
                              last edited by 10 Feb 2023, 13:04

                              @AndMaz yes probably better if you do, with a descriptive title. Then you can make this thread as solved. thanks!

                              www.duet3d.com

                              undefined 1 Reply Last reply 10 Feb 2023, 14:12 Reply Quote 0
                              • undefined
                                AndMaz @T3P3Tony
                                last edited by 10 Feb 2023, 14:12

                                @T3P3Tony don't know how to mark it as solved but here it goes

                                Update The original issue is solved https://github.com/Duet3D/RepRapFirmware/commit/f5fa23c3fd9eab9dc97cbefe317c3b0ee31cdf71 and released in v3.5beta2 (Link https://github.com/Duet3D/RepRapFirmware/wiki/Changelog-RRF-3.x-Beta#reprapfirmware-350beta2)

                                0 dc42 committed 9 Feb 2023, 08:19 to Duet3D/RepRapFirmware
                                Fix for FTP change to root directory (included in 3.5beta2 release)
                                1 Reply Last reply Reply Quote 0
                                • undefined T3P3Tony marked this topic as a question 10 Feb 2023, 14:46
                                • undefined T3P3Tony has marked this topic as solved 10 Feb 2023, 14:46
                                8 out of 15
                                • First post
                                  8/15
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA