recover from filesystem initialization error when user not in 'fuse' group

Bug #224651 reported by Y Giridhar Appaji Nag
2
Affects Status Importance Assigned to Milestone
pytagsfs
Fix Released
Undecided
Unassigned

Bug Description

If the user doesn't belong to the "fuse" group

$ uid=5908(giridhar) gid=100(users) groups=6(disk),24(cdrom),25(floppy),27(sudo),29(audio),44(video),100(users),104(nvram),105(thinkpad),112(powerdev),113(netdev),114(vmware)

$ pytagsfs -o format="/%g/%f" /media/usb/music/ pytagsfs
fuse: failed to open /dev/fuse: Permission denied
Traceback (most recent call last):
  File "/usr/bin/pytagsfs", line 20, in ?
    sys.exit(main())
  File "/usr/bin/pytagsfs", line 17, in main
    return fs.main()
  File "/usr/lib/python2.4/site-packages/pytagsfs/debug.py", line 83, in new_fn
    return fn(*args, **kwargs)
  File "/usr/lib/python2.4/site-packages/pytagsfs/debug.py", line 100, in new_fn
    retval = fn(*args, **kwargs)
  File "/usr/lib/python2.4/site-packages/pytagsfs/fs.py", line 455, in main
    retval = super(FileSystemMappingToRealFiles, self).main()
  File "/usr/lib/python2.4/site-packages/fuse.py", line 713, in main
    main(**d)
fuse.FuseError: filesystem initialization failed

Revision history for this message
Y Giridhar Appaji Nag (appaji) wrote :

Attached patch catches exceptions caused during init and logs an error.

If pytagsfs is run with the applied patch, the sessions looks like this:

$ pytagsfs -o format="/%g/%f" /media/usb/music/ pytagsfs
fuse: failed to open /dev/fuse: Permission denied

And running it in foreground (-f)

$ pytagsfs -o format="/%g/%f" /media/usb/music/ pytagsfs
fuse: failed to open /dev/fuse: Permission denied
error: are you a part of the fuse group?

Revision history for this message
Y Giridhar Appaji Nag (appaji) wrote :

> And running it in foreground (-f)
>
> $ pytagsfs -o format="/%g/%f" /media/usb/music/ pytagsfs

$ pytagsfs -f -o format="/%g/%f" /media/usb/music/ pytagsfs

Revision history for this message
Forest Bond (forest-bond) wrote :

Revision 392 in dev branch.

Changed in pytagsfs:
status: New → Fix Committed
Revision history for this message
Forest Bond (forest-bond) wrote :

pytagsfs version 0.7.0rc1

Changed in pytagsfs:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.