Access /dev/fuse without root?

768 views
Skip to first unread message

Paulo Ribeiro

unread,
Nov 15, 2016, 1:09:05 PM11/15/16
to android-ndk
Hello,

I need to build an app that mounts a remote FileSystem in a local dir. For that I need to use FUSE that come with new android versions(4.x+ i think). I'm compiling libfuse(https://github.com/libfuse/libfuse) with NDK,
if I generate an executable and run it in a shell with root permissions it runs with no problems. 
But I need to make it run without root permissions, so I'm generating a shared lib, but when I call the "munt process" i get and error from the C code: "Permission denied: /dev/fuse" when trying to do a open("/dev/fuse", O_RDWR). 

There is any away to use FUSE without root?? 

Thanks,
Paulo Ribeiro.  

J Decker

unread,
Nov 15, 2016, 2:51:37 PM11/15/16
to andro...@googlegroups.com
yes, but you'd have to have root to change the permissions.  (so no)
There ARE some android deployments that allow fuse for users; (since it is for user file systems :) )

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/6b135dc4-3b87-433f-8510-0fffa7a6755a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

RC

unread,
Jan 26, 2017, 5:18:45 PM1/26/17
to android-ndk
hi J Decker,

can you be so kind to point out these deployments that allow fuse without root access change? thanks.


On Wednesday, November 16, 2016 at 3:51:37 AM UTC+8, J Decker wrote:
yes, but you'd have to have root to change the permissions.  (so no)
There ARE some android deployments that allow fuse for users; (since it is for user file systems :) )
On Tue, Nov 15, 2016 at 9:55 AM, Paulo Ribeiro <pauloacr...@gmail.com> wrote:
Hello,

I need to build an app that mounts a remote FileSystem in a local dir. For that I need to use FUSE that come with new android versions(4.x+ i think). I'm compiling libfuse(https://github.com/libfuse/libfuse) with NDK,
if I generate an executable and run it in a shell with root permissions it runs with no problems. 
But I need to make it run without root permissions, so I'm generating a shared lib, but when I call the "munt process" i get and error from the C code: "Permission denied: /dev/fuse" when trying to do a open("/dev/fuse", O_RDWR). 

There is any away to use FUSE without root?? 

Thanks,
Paulo Ribeiro.  

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.

Glenn Kasten

unread,
Jan 26, 2017, 5:33:51 PM1/26/17
to android-ndk
Sorry I'm coming late to this discussion.
This thread has veered a bit off-topic from the main scope of android-ndk,
since it is a generic permission problem that is not related to NDK
(native code does not have any special privileges compared to SDK).

So another group such as android-platform may be more appropriate.

J Decker

unread,
Jan 27, 2017, 11:21:51 PM1/27/17
to andro...@googlegroups.com
This says lots about FUSE support.

https://android.googlesource.com/platform/docs/source.android.com/+/jb-mr1-release/src/tech/storage/index.md

I don't recall which device I had that it was enabled, so don't take this as gospel; I tried to find other references but... who'd care to write 'this is a list of devices with user-usable FUSE' ....

Maybe it was my galaxy s3?  Maybe it was an emulator?  Maybe it was my dragon touch tablet?  It is not my LG phone, probably wasn't my samsung phone... but it might have been that tablet, because my initial query found fuse usable.


(uses fuse)... it might require a rooted phone though...

but maybe the system (4.4+) can give you write access to it so you can host a in-process daemon; it DOES work; you just have to write the u+w bit on /dev/fuse




To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
Reply all
Reply to author
Forward
0 new messages