Skip to content

SFTP connects fine but no files are shown #754

New issue

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

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

Already on GitHub? # to your account

Closed
C-O-D opened this issue Jul 12, 2023 · 16 comments · Fixed by #1133
Closed

SFTP connects fine but no files are shown #754

C-O-D opened this issue Jul 12, 2023 · 16 comments · Fixed by #1133
Assignees
Labels
bug Something isn't working

Comments

@C-O-D
Copy link

C-O-D commented Jul 12, 2023

As the title says, sftp connection seems to be successful via key file but it's only shown as an empty folder.
This did work correctly a few versions ago and I'm having no access problems with several other apps...

@deadlyjack
Copy link
Collaborator

Seems to work fine. Wait for next update and let me know it is fixed.

@C-O-D
Copy link
Author

C-O-D commented Jul 13, 2023

Still not working here. No matter if I use a key file or passphrase it's always showing an empty folder when I try to access my LibreELEC on a RockPi 4B.
And as I said, it did work sometime in the past...

@deadlyjack
Copy link
Collaborator

Have you tried in other apps?

@C-O-D
Copy link
Author

C-O-D commented Jul 13, 2023

Yes, as I said, I'm having absolutely no access problems with other apps. File Manager, VLC, password manager, all are able to list files...

@deadlyjack
Copy link
Collaborator

Can you create demo user for me test. Because all other ftp I'm testing is working fine.

@C-O-D
Copy link
Author

C-O-D commented Jul 15, 2023

I don't know exactly what you mean. I can't send you my SSH key nor can I share the device over the internet. You can install LibreELEC on any device and try it yourself. If saying it worked a few versions before isn't enough, then I don't know. All I know is that was the main reason to use your editor, as I need an editor with network access.
There is an app called code editor from rytm software in the play store that works fine with that. When in doubt, it's probably easier for me to go back to that app, unfortunately....

@wayn-r
Copy link

wayn-r commented Sep 18, 2023

Can we get an update on this? Any attempts to pinpoint the issue? I'm having the same problem as OP as I can connect to the SFTP server, but no files are shown. Connecting with another app works fine.

@C-O-D
Copy link
Author

C-O-D commented Sep 18, 2023

Can we get an update on this? Any attempts to pinpoint the issue? I'm having the same problem as OP as I can connect to the SFTP server, but no files are shown. Connecting with another app works fine.

In the meantime, I bought QuickEdit+ from the PlayStore and it runs without a single problem. Whether with key or without...

@hyperanalysis
Copy link

hyperanalysis commented Nov 11, 2024

Hi, same problem as OP here. I have 3 storage folders configured, 1 local and 2 SFTP - the first SFTP is my main home server which works fine, the second is my Home Assistant (OS) server which I enabled SFTP on so I can edit .yaml files in an app directly which is far superior to the built-in file manager in HA.

I'm afraid I got frustrated and have also switched to Code Editor from Rhythm Software, which lists all files without issue. However, seeing as Acode worked fine for everything else, and considering I paid the fee to have ads removed, I'm going to hang onto it for now, and offer some advice that may help you track down the root cause of the issue:

It seems that Acode will only display files which are directly owned with full permissions to the user you are logging into an SFTP source with.
I noticed this whilst frustratingly testing everything possible when I couldn't get to any files or folders on HAOS despite seemingly connecting fine.
Going back to my home server SFTP connection, I noticed that not all files were showing - when connecting over PuTTy and comparing, I realised that Acode was not showing files which had any attributes other than complete ownership by the logged in user.

This makes sense as to why I couldn't see anything on the HAOS connection in Acode, as that server is an emulated server and has unusual permissions on files, which Acode doesn't seem to like.

I would guess that OP's issue is the same, and that the server he's logging into doesn't have exclusive file rights to the contents for the logged-in user.

Like I say I'm using Code Editor for this project now just so I can get on with it, but wanted to give some direct evidence analysis should it be able to help you.

@eclipseo
Copy link

eclipseo commented Jan 3, 2025

Ok i have found from where this issue is coming. Internally Acode just sends a plain ls command to the sftp server and parses the result. However on my .bash_aliases and config.fish I had aliased ls to exa. If I get rid of this Alias, Acode list files and folders correctly.

Maybe the authors could hard-core /usr/bin/ls to avoid this? Or do a which ls first then use the resulting command for the listing.

@bajrangCoder bajrangCoder added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Jan 3, 2025
@bajrangCoder bajrangCoder self-assigned this Jan 3, 2025
@bajrangCoder
Copy link
Collaborator

Ok i have found from where this issue is coming. Internally Acode just sends a plain ls command to the sftp server and parses the result. However on my .bash_aliases and config.fish I had aliased ls to exa. If I get rid of this Alias, Acode list filescand folders correctly.

Maybe the authors could hard-core /usr/bin/ls to avoid this? Or do a which ls first then use the resulting command for the listing.

Oh, I hadn't noticed that before—thank you for pointing it out! I'll make sure to fix it soon.

@eclipseo
Copy link

eclipseo commented Jan 4, 2025

@bajrangCoder there is another thing where you use [[ -f ]] to test for a file, but this is not available on all shells, notably the fish shell.

@bajrangCoder
Copy link
Collaborator

@bajrangCoder there is another thing where you use [[ -f ]] to test for a file, but this is not available on all shells, notably the fish shell.

Hmm, there are many more flaws

Feel free to contribute! Btw I'll try to improve

@PoshoDev
Copy link

PoshoDev commented Jan 21, 2025

I am having the same issue as @C-O-D. I am able to connect just fine via SFTP but then files or folders are not shown (even with the "show hidden files" option enabled).

Image

Image

SFTP works fine when I use it with Termux on the same phone, for example:

Image

I am using the latest Acode version from the Play Store.

@bajrangCoder
Copy link
Collaborator

I am having the same issue as @C-O-D. I am able to connect just fine via SFTP but then files or folders are not shown (even with the "show hidden files" option enabled).

Image

Image

SFTP works fine when I use it with Termux on the same phone, for example:

Image

I am using the latest Acode version from the Play Store.

It's already fixed and it will be available in v1.10.8.
Or test the beta version of v1.10.8 from discord server or telegram

@PoshoDev
Copy link

It's already fixed and it will be available in v1.10.8. Or test the beta version of v1.10.8 from discord server or telegram

@bajrangCoder I just changed to v1.10.8 and I'm afraid the issue persists.

Image

Image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants