Browse files

Add allow_others option

  • Loading branch information...
1 parent dfafb3a commit ca2e2c82487b6dcdac9bc88f8019b45b44fb1ea0 @blackjack blackjack committed Aug 14, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 main.go
@@ -17,6 +17,7 @@ func main() {
mtpDebug := flag.Int("mtp-debug", 0, "switch on MTP debugging. 1=PTP, 2=PLST, 4=USB, 8=DATA")
backing := flag.String("backing-dir", "", "backing store for locally cached files. Default: use a temporary directory.")
vfat := flag.Bool("vfat", true, "assume removable RAM media uses VFAT, and rewrite names.")
+ other := flag.Bool("allow-other", false, "allow other users to access mounted fuse. Default: false.")
if len(flag.Args()) != 1 {
@@ -80,7 +81,10 @@ func main() {
rawFs := fuse.NewLockingRawFileSystem(conn)
mount := fuse.NewMountState(rawFs)
- if err := mount.Mount(mountpoint, nil); err != nil {
+ mOpts := &fuse.MountOptions{
+ AllowOther: *other,
+ }
+ if err := mount.Mount(mountpoint, mOpts); err != nil {
log.Fatalf("mount failed: %v", err)

6 comments on commit ca2e2c8

Hi All,
i thank you for your work. I have tested go-mtpfs with ma GNex on Slackware 14.0-x64 and it is REALLY better than other mtp protocols, but i have a problem with automounting as normal user. I would to exec go-mtpfs mountpoint in a udev rule, but if i run it "as is" internal storage will owned by root only. So i tried to use su -l $user -c command, but udev doesn't "accept" this syntax. Now i have seen that it is supported allow-other option so i can use it(and i like the approch), but i cant compile go sources. Can You public a fresh build for x64 archs please, or suggest to me an alternative? Thank you in advance.


Where is it? I need that also :)


Perfect. Thank you.

Please sign in to comment.