You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hate that I cannot access all files that a normal filemanager has access to in a single namespace using sshfs.
I understand that I can use SAF to select which folder to access, but I would much rather access everything in one go.
So I propose a slightly modified "Plain old filesystem": Identify all the paths that can be accessed by the user and present those in a single namespace. For dirs that you do not have -r right to, assume it is empty apart from the dirs that we know must exist.
For example: When starting the server it tests "well-known" paths, such as /storage/emulated/0. Let us assume it exists and is readable/writable by the user. Let us assume / and /storage/emulated/ only have -x, so you cannot list the files in those dirs.
You can, however, determine that /storage and /storage/emulated/0 do exist, so instead of failing to list anyting in / and /storage/emulated list /storage and /storage/emulated/0 repectively.
In other words:
$ sshfs -p 1234 [email protected]:/ phone
$ cd phone
$ ls
(Here you would normally get: ls: reading directory '.': Permission denied)
storage
$ cd storage
$ ls
0F74-0C3F emulated self
$ cd emulated
(Here you would normally get: ls: reading directory '.': Permission denied)
0
$ cd 0
$ ls Android
data media obb
This way you would be able to do things like:
du phone
and get the usage of both /storage/emulated/0 an /storage/0F74-0C3F.
Without rooting the phone I understand this cannot be perfect: You cannot know if someone has created /storage2 that you have full access to. But you can at least try all the "well-known" paths and see which of these exist. I believe Android also has a way to list the paths of some user dirs, and it will be natural to test if these exist, too.
The text was updated successfully, but these errors were encountered:
#352 fixed this in 7.2. Also these "injected" folders and their parents got r and x mode flags enabled to make them "friendly" to file-managers and sshfs. Note: it is possible to add other "known to exists" folders.
I hate that I cannot access all files that a normal filemanager has access to in a single namespace using
sshfs
.I understand that I can use SAF to select which folder to access, but I would much rather access everything in one go.
So I propose a slightly modified "Plain old filesystem": Identify all the paths that can be accessed by the user and present those in a single namespace. For dirs that you do not have -r right to, assume it is empty apart from the dirs that we know must exist.
For example: When starting the server it tests "well-known" paths, such as
/storage/emulated/0
. Let us assume it exists and is readable/writable by the user. Let us assume/
and/storage/emulated/
only have -x, so you cannot list the files in those dirs.You can, however, determine that
/storage
and/storage/emulated/0
do exist, so instead of failing to list anyting in/
and/storage/emulated
list/storage
and/storage/emulated/0
repectively.In other words:
This way you would be able to do things like:
and get the usage of both
/storage/emulated/0
an/storage/0F74-0C3F
.Without rooting the phone I understand this cannot be perfect: You cannot know if someone has created
/storage2
that you have full access to. But you can at least try all the "well-known" paths and see which of these exist. I believe Android also has a way to list the paths of some user dirs, and it will be natural to test if these exist, too.The text was updated successfully, but these errors were encountered: