Menu

#142 FTPD server "550:File not found" above root directory with some clients

All Platforms
closed-fixed
nobody
5
2014-08-20
2014-04-01
No

Ethernut 5.2.2 - When browsing the FTP server, folders other than root return "550:File not found"

  • Client: Windows 7 explorer (using active FTP)
  • Client: Filezilla 3.8.0 (using active FTP)
    And probably some others.

This appeared to be due to stray trailing slashes in pathnames. In order to make it work as expected I added the following code to /nut/pro/ftpd.c, in function CreateFullPathName(), at line 382 (just after the work directory gets stripped of trailing slash):

~~~~
if (pl && pl > 1 && (path + pl - 1) == '/') {
(path + pl - 1) = 0;
pl--;
}

~~~~~
This strips the path of any trailing slashes as well, allowing the subsequent code to produce valid pathnames.


Tested on Tickernut (mega2561 on 1.3g compatible homebrew hardware)
Full FTP functionality available (except PASV, which appears to have some other problem.)

Discussion

  • Ole Reinhardt

    Ole Reinhardt - 2014-08-20

    Fixed in rev. [r5776].

     

    Related

    Commit: [r5776]


    Last edit: Ole Reinhardt 2014-08-20
  • Ole Reinhardt

    Ole Reinhardt - 2014-08-20
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB