* [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
@ 2014-07-22 22:23 Walter Dnes
2014-07-24 22:52 ` Neil Bothwick
0 siblings, 1 reply; 12+ messages in thread
From: Walter Dnes @ 2014-07-22 22:23 UTC (permalink / raw
To: Gentoo Users List
I'm a total noobie at mtpfs/FUSE. My "excellent adventure" started
yesterday when I got a clearout 7" tablet, and took a sample photo, and
tried mounting the tablet... no /dev/sdb to be found anywhere. I went
to "Mr. Google" for help, and found out that MTP is the "new and
improved" way of doing things. So I installed mtpfs. It works great
for root, but a regular user can't mount the tablet. The mtpfs command
immediately returns to the command prompt, with no error message or any
other info. The tablet is not mounted...
[d531][waltdnes][~] mtpfs ~/tablet
[d531][waltdnes][~]
Before anyone asks...
1) Yes, I have enabled FUSE in the kernel. At first I hadn't, but I got
a big red warning when I tried compiling mtpfs. I tweaked and rebuilt
the kernel, and rebooted, then built mtpfs.
2) Yes, I am a member of plugdev...
[d531][root][~] grep plugdev /etc/group
plugdev:x:247:waltdnes,user2
3) This PC uses mdev rather than udev. Could that be the problem?
I've figured out a kludge to get around it. This involves issuing a
few commands as root. I could add them into a file in /etc/sudoers.d/
if there's no other way around this...
[d531][root][~] mtpfs -o allow_other /home/waltdnes/tablet
Device 0 (VID=0bb4 and PID=2008) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Android device detected, assigning default bug flags
[d531][root][~] chown -R waltdnes:users /home/waltdnes/tablet
The "chown" command allows me to get at all the data, and copy photos
off the tablet to my PC, and delete them off the tablet. And also move
any other data files to/from the tablet. When I was finished, I tried...
[d531][waltdnes][~] fusermount -u tablet
fusermount: entry for /home/waltdnes/tablet not found in /etc/mtab
I had to unmount as root...
[d531][root][~] fusermount -u /home/waltdnes/tablet
I experienced similar problems with simple-mtpfs, so that's not a
solution either. Any ideas?
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
@ 2014-07-24 4:59 Walter Dnes
2014-07-25 5:07 ` Samuli Suominen
0 siblings, 1 reply; 12+ messages in thread
From: Walter Dnes @ 2014-07-24 4:59 UTC (permalink / raw
To: Gentoo Users List
I sent this a day or 2 ago, but it doesn't show up on the list for me.
Apologies to anyone seeing a duplicate.
I'm a total noobie at mtpfs/FUSE. My "excellent adventure" started
yesterday when I got a clearout 7" tablet, and took a sample photo, and
tried mounting the tablet... no /dev/sdb to be found anywhere. I went
to "Mr. Google" for help, and found out that MTP is the "new and
improved" way of doing things. So I installed mtpfs. It works great
for root, but a regular user can't mount the tablet. The mtpfs command
immediately returns to the command prompt, with no error message or any
other info. The tablet is not mounted...
[d531][waltdnes][~] mtpfs ~/tablet
[d531][waltdnes][~]
Before anyone asks...
1) Yes, I have enabled FUSE in the kernel. At first I hadn't, but I got
a big red warning when I tried compiling mtpfs. I tweaked and rebuilt
the kernel, and rebooted, then built mtpfs.
2) Yes, I am a member of plugdev...
[d531][root][~] grep plugdev /etc/group
plugdev:x:247:waltdnes,user2
3) This PC uses mdev rather than udev. Could that be the problem?
I've figured out a kludge to get around it. This involves issuing a
few commands as root. I've added them into a file in /etc/sudoers.d/
but I'd really rather prefer a cleaner solution.
[d531][root][~] mtpfs -o allow_other /home/waltdnes/tablet
Device 0 (VID=0bb4 and PID=2008) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Android device detected, assigning default bug flags
When I was finished, I tried...
[d531][waltdnes][~] fusermount -u tablet
fusermount: entry for /home/waltdnes/tablet not found in /etc/mtab
I had to unmount as root...
[d531][root][~] fusermount -u /home/waltdnes/tablet
I experienced similar problems with simple-mtpfs, so that's not a
solution either. Any ideas?
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-22 22:23 [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK Walter Dnes
@ 2014-07-24 22:52 ` Neil Bothwick
2014-07-24 23:29 ` Walter Dnes
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Neil Bothwick @ 2014-07-24 22:52 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Tue, 22 Jul 2014 18:23:47 -0400, Walter Dnes wrote:
> I'm a total noobie at mtpfs/FUSE. My "excellent adventure" started
> yesterday when I got a clearout 7" tablet, and took a sample photo, and
> tried mounting the tablet... no /dev/sdb to be found anywhere. I went
> to "Mr. Google" for help, and found out that MTP is the "new and
> improved" way of doing things.
Improved, maybe, necessary, definitely. The old way of using mass storage
meant the storage had to be unmounted on the phone first, which could
break running applications.
> So I installed mtpfs. It works great
> for root, but a regular user can't mount the tablet. The mtpfs command
> immediately returns to the command prompt, with no error message or any
> other info.
I has problems with mtpfs and switched to jmtpfs, which works much
better. Or you can install SSHd on the tablet and use scp/sshfs.
--
Neil Bothwick
The Computer is the logical advancement of humankind:
intelligence without morality.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-24 22:52 ` Neil Bothwick
@ 2014-07-24 23:29 ` Walter Dnes
2014-07-24 23:34 ` Neil Bothwick
2014-07-25 9:36 ` Mick
2014-07-25 7:03 ` Helmut Jarausch
2014-07-26 11:56 ` Dark Templar
2 siblings, 2 replies; 12+ messages in thread
From: Walter Dnes @ 2014-07-24 23:29 UTC (permalink / raw
To: gentoo-user
On Thu, Jul 24, 2014 at 11:52:15PM +0100, Neil Bothwick wrote
> I has problems with mtpfs and switched to jmtpfs, which works much
> better.
I can't find such an ebuild. For the time being, I've set commands in
/etc/sudoers.d/ to have root mount the tablet, with the "allow_other"
option enabled. And also the unmount equivalant. I notice that mtpfs
doesn't see the "My Documents" folder on the tablet. I assume it
doesn't like spaces in directory (and possibly file) names.
> Or you can install SSHd on the tablet and use scp/sshfs.
That'll have to wait until after I get back from a trip next month. I
want the tablet working properly when I go on the trip. The camera is
actually quite good for a tablet. When I get back, I'll get the tablet
rooted, and maybe go to CyanogenMod. "Nuke and re-pave".
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-24 23:29 ` Walter Dnes
@ 2014-07-24 23:34 ` Neil Bothwick
2014-07-25 9:36 ` Mick
1 sibling, 0 replies; 12+ messages in thread
From: Neil Bothwick @ 2014-07-24 23:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
On Thu, 24 Jul 2014 19:29:42 -0400, Walter Dnes wrote:
> > I has problems with mtpfs and switched to jmtpfs, which works much
> > better.
>
> I can't find such an ebuild.
I should have looked at my eix output more closely, it's installed from
the poly-c overlay.
--
Neil Bothwick
A friend in need may turn out to be a nuisance.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-24 4:59 Walter Dnes
@ 2014-07-25 5:07 ` Samuli Suominen
2014-07-25 6:36 ` Walter Dnes
0 siblings, 1 reply; 12+ messages in thread
From: Samuli Suominen @ 2014-07-25 5:07 UTC (permalink / raw
To: gentoo-user
On 24/07/14 07:59, Walter Dnes wrote:
> I sent this a day or 2 ago, but it doesn't show up on the list for me.
> Apologies to anyone seeing a duplicate.
>
> I'm a total noobie at mtpfs/FUSE. My "excellent adventure" started
> yesterday when I got a clearout 7" tablet, and took a sample photo, and
> tried mounting the tablet... no /dev/sdb to be found anywhere. I went
> to "Mr. Google" for help, and found out that MTP is the "new and
> improved" way of doing things. So I installed mtpfs. It works great
> for root, but a regular user can't mount the tablet. The mtpfs command
> immediately returns to the command prompt, with no error message or any
> other info. The tablet is not mounted...
>
> [d531][waltdnes][~] mtpfs ~/tablet
> [d531][waltdnes][~]
>
> Before anyone asks...
>
> 1) Yes, I have enabled FUSE in the kernel. At first I hadn't, but I got
> a big red warning when I tried compiling mtpfs. I tweaked and rebuilt
> the kernel, and rebooted, then built mtpfs.
>
> 2) Yes, I am a member of plugdev...
>
> [d531][root][~] grep plugdev /etc/group
> plugdev:x:247:waltdnes,user2
>
> 3) This PC uses mdev rather than udev. Could that be the problem?
>
> I've figured out a kludge to get around it. This involves issuing a
> few commands as root. I've added them into a file in /etc/sudoers.d/
> but I'd really rather prefer a cleaner solution.
>
> [d531][root][~] mtpfs -o allow_other /home/waltdnes/tablet
> Device 0 (VID=0bb4 and PID=2008) is UNKNOWN.
> Please report this VID/PID and the device model to the libmtp development team
> Android device detected, assigning default bug flags
>
> When I was finished, I tried...
>
> [d531][waltdnes][~] fusermount -u tablet
> fusermount: entry for /home/waltdnes/tablet not found in /etc/mtab
>
> I had to unmount as root...
>
> [d531][root][~] fusermount -u /home/waltdnes/tablet
>
> I experienced similar problems with simple-mtpfs, so that's not a
> solution either. Any ideas?
>
Install gnome-base/gvfs with USE="gphoto2 mtp" and then use gvfs-mount
to mount the device, because gvfs-mount
will make use of your PolicyKit with ConsoleKit or systemd-logind
authorization that allows mounting as a *local*
and *normal* user.
Then you don't need the mtpfs command, any group, any custom udev rules, ...
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-25 5:07 ` Samuli Suominen
@ 2014-07-25 6:36 ` Walter Dnes
2014-07-25 9:35 ` Samuli Suominen
0 siblings, 1 reply; 12+ messages in thread
From: Walter Dnes @ 2014-07-25 6:36 UTC (permalink / raw
To: gentoo-user
On Fri, Jul 25, 2014 at 08:07:10AM +0300, Samuli Suominen wrote
> Install gnome-base/gvfs with USE="gphoto2 mtp" and then use gvfs-mount
> to mount the device, because gvfs-mount
> will make use of your PolicyKit with ConsoleKit or systemd-logind
> authorization that allows mounting as a *local*
> and *normal* user.
> Then you don't need the mtpfs command, any group, any custom udev rules, ...
Pulling in gnome-base/gvfs and media-libs/libgphoto2 isn't that big an
issue. The question is... will I be able to mount from a straight text
console, especially when X is not running?
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-24 22:52 ` Neil Bothwick
2014-07-24 23:29 ` Walter Dnes
@ 2014-07-25 7:03 ` Helmut Jarausch
2014-07-26 11:56 ` Dark Templar
2 siblings, 0 replies; 12+ messages in thread
From: Helmut Jarausch @ 2014-07-25 7:03 UTC (permalink / raw
To: gentoo-user
On 07/25/2014 12:52:15 AM, Neil Bothwick wrote:
> On Tue, 22 Jul 2014 18:23:47 -0400, Walter Dnes wrote:
>
> > I'm a total noobie at mtpfs/FUSE. My "excellent adventure"
> started
> > yesterday when I got a clearout 7" tablet, and took a sample photo,
> and
> > tried mounting the tablet... no /dev/sdb to be found anywhere. I
> went
> > to "Mr. Google" for help, and found out that MTP is the "new and
> > improved" way of doing things.
>
> Improved, maybe, necessary, definitely. The old way of using mass
> storage
> meant the storage had to be unmounted on the phone first, which could
> break running applications.
>
> > So I installed mtpfs. It works great
> > for root, but a regular user can't mount the tablet. The mtpfs
> command
> > immediately returns to the command prompt, with no error message or
> any
> > other info.
>
> I has problems with mtpfs and switched to jmtpfs, which works much
> better. Or you can install SSHd on the tablet and use scp/sshfs.
>
I don't have good experience with jmtpfs. Here, it's dead slow and
hangs sometimes
(connected to my Galaxy S3 mini).
But, I have switched to go-mtpfs. This is really fast and seems to be
stable.
Since I'm lazy I haven't tried to access without root priviledges.
Helmut
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-25 6:36 ` Walter Dnes
@ 2014-07-25 9:35 ` Samuli Suominen
2014-07-25 9:47 ` Samuli Suominen
0 siblings, 1 reply; 12+ messages in thread
From: Samuli Suominen @ 2014-07-25 9:35 UTC (permalink / raw
To: gentoo-user
On 25/07/14 09:36, Walter Dnes wrote:
> On Fri, Jul 25, 2014 at 08:07:10AM +0300, Samuli Suominen wrote
>
>> Install gnome-base/gvfs with USE="gphoto2 mtp" and then use gvfs-mount
>> to mount the device, because gvfs-mount
>> will make use of your PolicyKit with ConsoleKit or systemd-logind
>> authorization that allows mounting as a *local*
>> and *normal* user.
>> Then you don't need the mtpfs command, any group, any custom udev rules, ...
> Pulling in gnome-base/gvfs and media-libs/libgphoto2 isn't that big an
> issue. The question is... will I be able to mount from a straight text
> console, especially when X is not running?
>
Semi-long answer
Yes, if you have /etc/init.d/consolekit in your default runlevel, and
sys-auth/consolekit built with USE="pam"
and sys-auth/pambase built with USE="consolekit", you get a PAM module
called pam_ck_connector.so
So, when you login to text console, pam_ck_connector.so kicks in and
will tell PolicyKit you are a local user,
it will show up in `ck-list-sessions` command as "active = TRUE" -line
Then, when you run gvfs-mount from text console, it will query PolicyKit
if you are allowed or not, and
you are, since pam_ck_connector.so has done the job
Short answer:
Yes, everything related works from command line outside of X as well
- Samuli
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-24 23:29 ` Walter Dnes
2014-07-24 23:34 ` Neil Bothwick
@ 2014-07-25 9:36 ` Mick
1 sibling, 0 replies; 12+ messages in thread
From: Mick @ 2014-07-25 9:36 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 510 bytes --]
On Friday 25 Jul 2014 00:29:42 Walter Dnes wrote:
> I notice that mtpfs
> doesn't see the "My Documents" folder on the tablet. I assume it
> doesn't like spaces in directory (and possibly file) names.
In a terminal you will need to escape spaces when copying with scp, like so:
scp user@1.2.3.4:/home/user/My\\\ Documents ./
However, you shouldn't need to do anything special to list names with spaces
in them, so this may have something to do with the fs specification.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-25 9:35 ` Samuli Suominen
@ 2014-07-25 9:47 ` Samuli Suominen
0 siblings, 0 replies; 12+ messages in thread
From: Samuli Suominen @ 2014-07-25 9:47 UTC (permalink / raw
To: gentoo-user
On 25/07/14 12:35, Samuli Suominen wrote:
> On 25/07/14 09:36, Walter Dnes wrote:
>> On Fri, Jul 25, 2014 at 08:07:10AM +0300, Samuli Suominen wrote
>>
>>> Install gnome-base/gvfs with USE="gphoto2 mtp" and then use gvfs-mount
>>> to mount the device, because gvfs-mount
>>> will make use of your PolicyKit with ConsoleKit or systemd-logind
>>> authorization that allows mounting as a *local*
>>> and *normal* user.
>>> Then you don't need the mtpfs command, any group, any custom udev rules, ...
>> Pulling in gnome-base/gvfs and media-libs/libgphoto2 isn't that big an
>> issue. The question is... will I be able to mount from a straight text
>> console, especially when X is not running?
>>
> Semi-long answer
>
> Yes, if you have /etc/init.d/consolekit in your default runlevel, and
> sys-auth/consolekit built with USE="pam"
> and sys-auth/pambase built with USE="consolekit", you get a PAM module
> called pam_ck_connector.so
> So, when you login to text console, pam_ck_connector.so kicks in and
> will tell PolicyKit you are a local user,
> it will show up in `ck-list-sessions` command as "active = TRUE" -line
> Then, when you run gvfs-mount from text console, it will query PolicyKit
> if you are allowed or not, and
> you are, since pam_ck_connector.so has done the job
>
> Short answer:
>
> Yes, everything related works from command line outside of X as well
>
> - Samuli
>
...and if you want to be able to use it as non-local user like via ssh
from text console, then
it needs /etc/polkit-1/rules.d/ file like 10-mtp.rules to give authozation
there are examples for writing .rules if you google around, sorry I
don't have
time to go into that now
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK
2014-07-24 22:52 ` Neil Bothwick
2014-07-24 23:29 ` Walter Dnes
2014-07-25 7:03 ` Helmut Jarausch
@ 2014-07-26 11:56 ` Dark Templar
2 siblings, 0 replies; 12+ messages in thread
From: Dark Templar @ 2014-07-26 11:56 UTC (permalink / raw
To: gentoo-user
25.07.2014 02:52, Neil Bothwick пишет:
> On Tue, 22 Jul 2014 18:23:47 -0400, Walter Dnes wrote:
>
>> I'm a total noobie at mtpfs/FUSE. My "excellent adventure" started
>> yesterday when I got a clearout 7" tablet, and took a sample photo, and
>> tried mounting the tablet... no /dev/sdb to be found anywhere. I went
>> to "Mr. Google" for help, and found out that MTP is the "new and
>> improved" way of doing things.
> Improved, maybe, necessary, definitely. The old way of using mass storage
> meant the storage had to be unmounted on the phone first, which could
> break running applications.
>
>> So I installed mtpfs. It works great
>> for root, but a regular user can't mount the tablet. The mtpfs command
>> immediately returns to the command prompt, with no error message or any
>> other info.
> I has problems with mtpfs and switched to jmtpfs, which works much
> better. Or you can install SSHd on the tablet and use scp/sshfs.
>
>
I had problems with mtpfs and switched to simple-mtpfs, which works fine
for me.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-07-26 11:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-22 22:23 [gentoo-user] Regular user can't mount/unmount mtpfs; root is OK Walter Dnes
2014-07-24 22:52 ` Neil Bothwick
2014-07-24 23:29 ` Walter Dnes
2014-07-24 23:34 ` Neil Bothwick
2014-07-25 9:36 ` Mick
2014-07-25 7:03 ` Helmut Jarausch
2014-07-26 11:56 ` Dark Templar
-- strict thread matches above, loose matches on Subject: below --
2014-07-24 4:59 Walter Dnes
2014-07-25 5:07 ` Samuli Suominen
2014-07-25 6:36 ` Walter Dnes
2014-07-25 9:35 ` Samuli Suominen
2014-07-25 9:47 ` Samuli Suominen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox