bobrofon / easysshfs

SSHFS for Android
MIT License
106 stars 16 forks source link

pattern fuse.sshfs is not in /proc/mounts #3

Open chyyran opened 8 years ago

chyyran commented 8 years ago

EasySSHFS isn't mounting properly on 7.1 Nougat with phh's Superuser.

I get the following error in the log:

Pattern user@hostname:/ /data/media/0/mnt fuse.sshfs is not in /proc/mounts

masavini commented 7 years ago

same issue here on cyanogenmod 10.1.3 (based on android 4.2.2).

ggiesen commented 7 years ago

Same issue with a GR8 Stream running Android 4.4 and an Nvidia Shield Pro running Android 7.1

batzkass commented 7 years ago

I wrote a ... tiny fix for this I think (see pull request #4). For me, the problem was the presence of a special character in the ssh password that was interpreted by the android shell.

ggiesen commented 7 years ago

Are you able to tell us which character it was so we can confirm if it was potentially the same cause?

batzkass commented 7 years ago

Giving you my special character will not help you, as any character that is interpreted by android shell will make the mount to fail. I am not an expert of the android shell, but a list of special (=interpreted) characters of the linux bash (which is close to the android one) can be found here.

adrianharabula commented 7 years ago

I get the same fuse.sshfs error with passwordless logins too. Cannot make it work on galaxy S2 with cyanogenmod 12.1.

batzkass commented 7 years ago

EasySSHFS is a kind of GUI and manager that uses fuse/SSHFS to connect to remote hosts. To verify that the mount through the fuse/SSHFS binary was successful, easySSHFS checks that the corresponding line was written in /proc/mounts. As a consequence, any kind of fuse/SSHFS error will give the same "pattern fuse.sshfs is not in /proc/mounts" error.

For your specific case, I would like to add that the presence of a special character in any mount field (login, mount points, adress ...) will also result in the error.

Finally, the use of an external log app like "logcat" would likely give us some more informations.

staticflash commented 7 years ago

For special characters try putting a back slash in front of the special characters to escape them. Works perfectly!

faheem commented 7 years ago

I am having issues mounting on Oreo on shamu... it mounts fine as long as i mount in in /data/media/0/mount but i cannot seem to access that folder through any app. mounting on /mnt/sdcard/mount or /sdcard/mount causes an instant reboot and bootloops twice. Any suggestions?

RevenantX commented 7 years ago

@faheem i am have similar issue. Can view mounted folder only using "root" mode in FX explorer

faheem commented 7 years ago

Did you disable mount namespace separation In SuperSu? That fixed it for me.

On Mon 30 Oct, 2017, 7:46 PM Ruslan Pyrch, notifications@github.com wrote:

@faheem https://github.com/faheem i am have similar issue. Can view mounted folder only using "root" mode in FX explorer

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bobrofon/easysshfs/issues/3#issuecomment-340456994, or mute the thread https://github.com/notifications/unsubscribe-auth/AADjSiOfj-x3Gt2WY54EdZyiQHFsUsyDks5sxdoxgaJpZM4K3Iw8 .

RevenantX commented 7 years ago

@faheem yes. But i have different root (Magisk).

faheem commented 7 years ago

Sorry, did not try with magisk. Good luck.

On Mon 30 Oct, 2017, 8:43 PM Ruslan Pyrch, notifications@github.com wrote:

@faheem https://github.com/faheem yes. But i have different root (Magisk).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bobrofon/easysshfs/issues/3#issuecomment-340475635, or mute the thread https://github.com/notifications/unsubscribe-auth/AADjShQUsWavyvR8YF3HVCL9zt4RBpeeks5sxeesgaJpZM4K3Iw8 .

aaferrari commented 6 years ago

A few weeks ago the same thing happened to me, but I solved it by deactivating a SuperSU option as explained here. If this fix is valid for all other users with the same problem, then maybe EasySSHFS could display a warning like the following if that SuperSU option is enabled: It is known that the option "Mount namespace separation" of SuperSU can affect the normal function of the application. In case of problems it is recommended to disable that option before running EasySSHFS.

@faheem wrote: it mounts fine as long as i mount in in /data/media/0/mount but i cannot seem to access that folder through any app.

Something similar happened to me when I manually mounted with the sshfs binary from a console (the files could only be accessed from the console but not from Android apps).

adeweever91 commented 6 years ago

@RevenantX were you ever able to get magisk to work with sshfs? Im having the same problem as you while also using magisk.

RevenantX commented 6 years ago

@adeweever91 no. My smartphone died, so i bought new that support SuperSU and easysshfs is working okay)

bobrofon commented 6 years ago

Can someone try easysshfs 0.4.2 with magisk? And with SuperSU but with enabled 'mount namespace separation'?

adeweever91 commented 6 years ago

How would I use SuperSU with magisk? Magisk has the mount master option for all root applications and I have tried that as well but no luck. I also seem to still be unable to use keys with sshfs:

debug1: Next authentication method: publickey
debug1: Trying private key: /data/media/0/id_rsa
Load key "/data/media/0/id_rsa": invalid format

Its an RSA key made with ssh-keygen

bobrofon commented 6 years ago

How would I use SuperSU with magisk?

I mean either with Magisk either with SuperSU and MNS. It's a mutually exclusive options.

adeweever91 commented 6 years ago

Yeah I have tried that and no luck.

thutex commented 6 years ago

let me jump on this boat with you guys. using magisk, on oxygenos, with public key authentication. after mounting (path /data/media/0/mounts) there is nothing in the file manager. in a root session i also see nothing in /storage/emulated/0/mounts but when i use the root to list the contents of /data/media/0/mounts i get the full list. when i try to mount to /storage/emulated/0/mounts, however, mounting fails. also maybe of note is that the uid and gid when mounting are not respected and you end up with a uid and gid of 0

BLee3478 commented 5 years ago

For people having issues with not being able to see files without root, or similar problem, I believe it is due to the introduction of android runtime permissions of Android 6+. In order to see the mounts with any app, you have to mount to 3 directories: /mnt/runtime/{read,write,default}/emulated/0/XXXX

This allows for apps with "default, read only, and read and write" storage permissions to view the files. You can also omit one or more of the directories, but then not all apps will see them. For example, I believe the granting the "storage" permission for an app gives it the runtime directory of "write", so I noticed that all the apps that I need to use sshfs use this directory, so I only mount the "/mnt/runtime/write/emulated/0/XXXX" directory

kwcooper commented 5 years ago

Unfortunately none of these solutions seem to work for me (unrooted Galaxy S10) I get the same error on the log, not in 'proc/mounts'

CanadianJeff commented 4 years ago

I also get this error on my unrooted Pixel3 XL running Android 10 Build number QQ3A 200805 001 Kernel version 4.9.210 (June 9 2020)

masscream commented 2 years ago

Having also this issue on my Pixel phone. LineageOS 17.1, Magisk root. According to few ppl in the Gplay comments, they were able to set it up on LOS 17/18 with Magisk, so not sure what is the actual issue. Any luck going forward?

update: Yes it works, the issue was in this, like Sarah T. commented on Gplay:

Likely android issues with mounting /storage/emulated/0/ worka with /data/media/0, but this mount has issues with other apps.

however, she's right. /data/media/0 is useless for other non-root apps. Will check other options if there are any.

update2: Anders O. commented:

Works great on Android 11 (Pixel 3a) with Magisk 21.0. Requires root (obviously), and doesn't support mounting to the shared storage. It does support mounting to other apps' internal storage. I'm mounting my SSH remote to a location in Termux's home directory. From there, I can access the remote from any SAF enabled app. Works great!

Actually, this is working for me as well. Great, finally found a way how to sync my Titanium Backup directly onto my NAS and don't need to even install Samba....

update3: At least it looked like it worked. Technically it did and does, however it's about pushing boundaries. The connection was not very stable and during the backup of all of apps it dropped several times and the phone was warming up incredibly. Android is just not suitable for this kind of use. Nevertheless, mounting the folder onto Termux and having TB display its content and backing up several apps with not a bad network transfer speed I call at least as a very good result. Maybe in a few years we'll see improvement or TB will offer such a basic feature like network storage folders.

TheHardew commented 2 years ago

On samsung galaxy s21+ I created /mnt/media, set it as the path and it started working. I also have rclone and ssh modules from magisk, no idea if they are required.

I accessed the path via termux.

Didn't test any further.

manishmaharjan commented 2 years ago

I am facing same issue with unrooted Android 11 device. Has anyone managed to find any working work around so far? Thanks!

CanadianJeff commented 2 years ago

why has it taken this many years to solve this issue?

bobrofon commented 2 years ago

why has it taken this many years to solve this issue?

Well, basically because there is no such problem as "pattern sshfs is not in /proc/mounts". It is just an informational message (sanity check). You can simply ignore it. I am almost sure that most of the people here have a problem with misconfiguration. As @BLee3478 mentioned earlier, in android it can be a little tricky to mount something into desired location because of runtime permissions introduced in Android 6 (and also because of mount namespace separation introduced in Android 5, and because of external/emulated/adopted storages inconsistency, and maybe because of scoped storage introduced in Android 10 (but I never seen any problems with this)). Unfortunately it is kind of required to understand Android filesystem basics to use eashysshfs right now. I agree that proper diagnostic information and some configuration assistance from the application could help a lot. Even simply mounting all 'default/read/write' runtime directories at once will be useful. Any more complex features will require to reimplement easysshfs as a system service (like vold service) though. But as you can see the project is not fully maintained now (because of the lack of time mostly).

manishmaharjan commented 2 years ago

why has it taken this many years to solve this issue?

Well, basically because there is no such problem as "pattern sshfs is not in /proc/mounts". It is just an informational message (sanity check). You can simply ignore it. I am almost sure that most of the people here have a problem with misconfiguration. As @BLee3478 mentioned earlier, in android it can be a little tricky to mount something into desired location because of runtime permissions introduced in Android 6 (and also because of mount namespace separation introduced in Android 5, and because of external/emulated/adopted storages inconsistency, and maybe because of scoped storage introduced in Android 10 (but I never seen any problems with this)). Unfortunately it is kind of required to understand Android filesystem basics to use eashysshfs right now. I agree that proper diagnostic information and some configuration assistance from the application could help a lot. Even simply mounting all 'default/read/write' runtime directories at once will be useful. Any more complex features will require to reimplement easysshfs as a system service (like vold service) though. But as you can see the project is not fully maintained now (because of the lack of time mostly).

Any possibility to provide work around link or some step by step guide on how to mount ' default/read/write '. At least, I didn't managed to make this work in unrooted Android 11 device. Thanks!

bobrofon commented 2 years ago

At least, I didn't managed to make this work in unrooted Android 11 device.

I am afraid it is not possible to use sshfs (or any other fuse-based filesystem) on unrooted Android of any version. You better try to find something like 'sftp content provider' solution for this problem,

Efreak commented 2 years ago

You better try to find something like 'sftp content provider' solution for this problem,

There's actually a bunch of clients available for sharing files over storage access framework.

FileManagerUtils, RCX, can both allow you to use sftp with the storage access framework. Both have had releases about a year ago (May and July 2021), but neither have had any commits/maintainer activity since.

CIFS Documents Provider, Google's Android Samba Client and RCX can do SMB/CIFS. CIFS Documents Provider is maintained, Google's samba client is not (though it may be worth checking the network, which I can't scroll on mobile [thanks, GitHub])

For WebDAV there's WebDAV-Provider, RCX, and I think OwnCloud/NextCloud apps might use WebDAV?

For everything else, there's RCX (it's based on rclone), though some services won't work.

cybericius commented 2 years ago

On samsung galaxy s21+ I created /mnt/media, set it as the path and it started working. I also have rclone and ssh modules from magisk, no idea if they are required.

I accessed the path via termux.

Didn't test any further.

What is the method of creating the folder? I tried Total Commander to access the root folder with the existing mnt folder in it,.b up t cannot create a new one under it. Thank you

TheHardew commented 2 years ago

@cybericius I used termux with sudo. I don't know if there's a way to do it without a rooted system.

cybericius commented 2 years ago

@cybericius I used termux with sudo. I don't know if there's a way to do it without a rooted system.

I assumed the same, so I comsidered to look for an alternative.solution. I want to stream movies from Raspberry to phone, samba - though with its limited throughput - works for me. Thabks.

ampersandru commented 9 months ago

anyone figure this out with magisk? It WAS working on an older magisk, but I updated magisk to 27.0 and it stopped working. I tried playing with Mount Namespace Modes within Magisk but no luck - also there's no way to "Disable" it within magisk

bobrofon commented 9 months ago

It WAS working on an older magisk, but I updated magisk to 27.0 and it stopped working.

Well, yes. It looks like Magisk SU --mount-master option works on version 26.4 and doesn't work on version 27.0. Maybe it's a regression in the last Magisk release. Cannot say anything more specific for now. As a temporary workaround you can revert Magisk to version 26.4.

ampersandru commented 9 months ago

It WAS working on an older magisk, but I updated magisk to 27.0 and it stopped working.

Well, yes. It looks like Magisk SU --mount-master option works on version 26.4 and doesn't work on version 27.0. Maybe it's a regression in the last Magisk release. Cannot say anything more specific for now. As a temporary workaround you can revert Magisk to version 26.4.

yep, going back to 26.4 definitely works. Opened an issue on the magisk github

HuskyDG commented 9 months ago

It's because magisk has it own mount namespace since Magisk v27

bobrofon commented 9 months ago

It's because magisk has it own mount namespace since Magisk v27

I see. But to be honest, I don't really understand what's the point of --mount-master option from the end-user point of view after this change.

Anyway, #47 should be done to be compatible with Magisk v27.

TheHippoMan commented 8 months ago

Anyway, #47 should be done to be compatible with Magisk v27.

Unfortunately, this is not working on my stock Android 11 device (Pixel 5) running TJW Magisk 27002. It's still giving the same /data/media/0/mnt fuse.sshfs is not in /proc/mounts error.

The "Mount Namespace Mode" section of the Magisk Manager Settings offers 3 options:

All three of them yield the same /data/media/0/mnt fuse.sshfs is not in /proc/mounts error.

PS: I need 27002 for some other Magisk features, so I don't want to downgrade TJW Magisk back to version 264xx, simply to get EasySSHFS to work.

PPS: This is for easysshfs-0.5.11-release-signed.apk

bobrofon commented 8 months ago

Unfortunately, this is not working on my stock Android 11 device (Pixel 5) running TJW Magisk 27002

I don't see any obvious problems with the Magisk 81658d45 (27002)(D) build.

It's still giving the same /data/media/0/mnt fuse.sshfs is not in /proc/mounts error.

Did you try to use /mnt/runtime/default/emulated (the default EasySSHFS location) instead of /data/media ?

I don't want to downgrade TJW Magisk back to version 264xx, simply to get EasySSHFS to work.

But does it help? I mean, did you actually try to downgrade Magiks to resolve the problem?

brian6932 commented 7 months ago

Has anyone been able to get this to work with KSU (KernelSU)? I keep running into this, the use of overlayfs may be required.