Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"550 Could not get file size" for particular folders #173

Open
eku opened this issue Jul 12, 2023 · 5 comments
Open

"550 Could not get file size" for particular folders #173

eku opened this issue Jul 12, 2023 · 5 comments

Comments

@eku
Copy link

eku commented Jul 12, 2023

Describe the bug

I'm trying to backup the SD card in my switch via ftp. For this, as for other consoles, I use wget with the following command line

wget --mirror -c --no-host-directories --cut-dirs 0 --no-netrc --no-proxy --unlink --no-proxy --timeout=1 -P ftp://<IP of switch>:5000/ <local directory>

Some directories produce an FTP error, although I can very well access them via MTP. The consistency of the SD card was also checked.

To Reproduce
Steps to reproduce the behavior:

  1. Use the wget commandline from above
USER anonymous
230 OK
SYST
215 UNIX Type: L8
PWD
257 "/"
TYPE I
200 OK
CWD /atmosphere
200 OK
SIZE automatic_backups
550 Could not get file size.
PASV
227 Entering Passive Mode (192,168,55,89,50,60)
RETR automatic_backups
450 failed to open file

Expected behavior
All files and directories can be retrieved via ftp.

Screenshots

Platform (please complete the following information):

  • Switch 16.0.3. with Atmosphere

Additional context
See also cathery/sys-ftpd#26

For me it looks like the ftp daemon gets the type (file/directory) wrong for some directories.

@eku
Copy link
Author

eku commented Nov 17, 2023

Is there anything I can do to speed up error analysis and rectification? Diagnostic data? Should I test something?

@mtheall
Copy link
Owner

mtheall commented Nov 20, 2023

Does automatic_backups have the archive bit set?

@eku
Copy link
Author

eku commented Nov 24, 2023

Does automatic_backups have the archive bit set?

I don't know how to check this. NX-Shell does not show it. Neither do DBI and FTP. There is no other way available to me.

According to RFC959 there is no such thing as an "archive bit". The specification of the MTP protocol also says nothing about this.

Could you please explain the relationship between an archive bit and FTP? Which component should this set and why does the FTP server care?

@mtheall
Copy link
Owner

mtheall commented Jan 9, 2024

The archive bit is specific to FAT. The Switch's OS uses the archive bit to emulate files larger than 4GiB. As far as I'm aware, ftpd as a user application should see a directory with the archive bit set as if it were a file.

@eku
Copy link
Author

eku commented Jan 10, 2024

As far as I'm aware, ftpd as a user application should see a directory with the archive bit set as if it were a file.

Thanks for the explanation. That really is a strange implementation.

Anyway, I ran the Fix archive bit function in Hekate and nothing has improved. Error in ftpd still exists. DBI does not show this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants