From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2737C1387E8 for ; Fri, 25 Jul 2014 04:59:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9277DE152A; Fri, 25 Jul 2014 04:58:58 +0000 (UTC) Received: from mail-wi0-f195.google.com (mail-wi0-f195.google.com [209.85.212.195]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 499F9E1522 for ; Fri, 25 Jul 2014 04:58:56 +0000 (UTC) Received: by mail-wi0-f195.google.com with SMTP id n3so164628wiv.10 for ; Thu, 24 Jul 2014 21:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=6PFCu8L8sFTR+JcaglLSWo2Cl6UTRSzs7upQXIy8aZQ=; b=RCjiHvMo1Np6+V9pFwY8GFsxSKrbbk0J7WtsrCmEWG+5bXC+RC6BMHsOKwNH55PuOy V7U0YCjLmt4ane1PNsdg2ZNyGvaD7QD/d4aMPxbGq4CJt+6TVmvW94LptqDBySUcWurg FI4kr5/R0z7/aY8UcjRb4zfQjeXmRcL2dUK1/UAD+yx8cEeXShVsEkhMSIQfOmZMjqGs ycntus0gWeeBwkNtj7BasKSdaEqiJzwECNtQwCmoFqKnsa4wDnqbYotdZutW7IM/1ZjS C95rLa1gDMH5JT78jm8jEgPKYuksvHKug5ZnurLHItChR5RPl5nXx0yI931k1bzr0I21 zZgQ== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.194.89.36 with SMTP id bl4mr482108wjb.126.1406264335942; Thu, 24 Jul 2014 21:58:55 -0700 (PDT) Received: by 10.194.25.195 with HTTP; Thu, 24 Jul 2014 21:58:55 -0700 (PDT) In-Reply-To: References: <20140724045934.GA8107@waltdnes.org> Date: Fri, 25 Jul 2014 12:58:55 +0800 Message-ID: Subject: Re: [gentoo-user] Re: Regular user can't mount/unmount mtpfs; root is OK From: Mark David Dumlao To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=089e010d81b634495a04fefd6e1f X-Archives-Salt: 5677e407-c50a-4736-96e5-f2d67abe4109 X-Archives-Hash: b9b3d99b1fd46dc9a4a7c6005d98c2b4 --089e010d81b634495a04fefd6e1f Content-Type: text/plain; charset=UTF-8 On Fri, Jul 25, 2014 at 11:49 AM, walt wrote: > On 07/23/2014 09:59 PM, 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? > > I vaguely remember suffering through the same problem when I bought my > Nexus7 > tablet from google about a year ago. (My memories now are a bit fuzzy.) > > I believe I had to add this file manually: > > #cat /etc/udev/rules.d/51-android.rules > > SUBSYSTEM=="usb",ATTRS{idVendor}=="18d1",ATTRS{idProduct}=="4e41",MODE="0666",OWNER="wa1ter" > > I harvested those hex numbers from running "lsusb -v" IIRC. > > The idea behind w41ter's plan is to make sure that the device file corresponding to the mtp device is read-writable by the user running mtpfs. You mentioned that you are a member of the plugdev group, but does the plugdev group actually get ownership of the mtp device? This is something you'll have to investigate in your mdev rules. -- This email is: [ ] actionable [ ] fyi [ ] social Response needed: [ ] yes [ ] up to you [ ] no Time-sensitive: [ ] immediate [ ] soon [ ] none --089e010d81b634495a04fefd6e1f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Jul 25, 2014 at 11:49 AM, walt &= lt;w41ter@gmail.com> wrote:
On 07/23/2014 09:59 PM, Walter Dnes wrote= :
> =C2=A0 I sent this a day or 2 ago, but it doesn't show up on the l= ist for me.
> Apologies to anyone seeing a duplicate.
>
> =C2=A0 I'm a total noobie at mtpfs/FUSE. =C2=A0My "excellent = adventure" started
> yesterday when I got a clearout 7" tablet, and took a sample phot= o, and
> tried mounting the tablet... no /dev/sdb to be found anywhere. =C2=A0I= went
> to "Mr. Google" for help, and found out that MTP is the &quo= t;new and
> improved" way of doing things. =C2=A0So I installed mtpfs. =C2=A0= It works great
> for root, but a regular user can't mount the tablet. =C2=A0The mtp= fs command
> immediately returns to the command prompt, with no error message or an= y
> other info. =C2=A0The tablet is not mounted...
>
> [d531][waltdnes][~] mtpfs ~/tablet
> [d531][waltdnes][~]
>
> =C2=A0 Before anyone asks...
>
> 1) Yes, I have enabled FUSE in the kernel. =C2=A0At first I hadn't= , but I got
> a big red warning when I tried compiling mtpfs. =C2=A0I tweaked and re= built
> 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. =C2=A0Could that be the problem= ?
>
> =C2=A0 I've figured out a kludge to get around it. =C2=A0This invo= lves issuing a
> few commands as root. =C2=A0I've added them into a file in /etc/su= doers.d/
> but I'd really rather prefer a cleaner solution.
>
> [d531][root][~] mtpfs -o allow_other /home/waltdnes/tablet
> Device 0 (VID=3D0bb4 and PID=3D2008) is UNKNOWN.
> Please report this VID/PID and the device model to the libmtp developm= ent team
> Android device detected, assigning default bug flags
>
> =C2=A0 =C2=A0When I was finished, I tried...
>
> [d531][waltdnes][~] fusermount -u tablet
> fusermount: entry for /home/waltdnes/tablet not found in /etc/mtab
>
> =C2=A0 I had to unmount as root...
>
> [d531][root][~] fusermount -u /home/waltdnes/tablet
>
> =C2=A0 I experienced similar problems with simple-mtpfs, so that's= not a
> solution either. =C2=A0Any ideas?

I vaguely remember suffering through the same problem when I bo= ught my Nexus7
tablet from google about a year ago. =C2=A0(My memories now are a bit fuzzy= .)

I believe I had to add this file manually:

#cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=3D=3D"usb",ATTRS{idVendor}=3D=3D"18d1",ATTRS{= idProduct}=3D=3D"4e41",MODE=3D"0666",OWNER=3D"wa1t= er"

I harvested those hex numbers from running "lsusb -v" IIRC.


The idea behind w41ter's plan is to make sure= that the device file corresponding to the mtp device is read-writable by t= he user running mtpfs.

You mentioned that you are a membe= r of the plugdev group, but does the plugdev group actually get ownership o= f the mtp device? This is something you'll have to investigate in your = mdev rules.
=C2=A0



--
This email is:=C2= =A0 =C2=A0 [ ] actionable=C2=A0=C2=A0 [ ] fyi=C2=A0 =C2=A0 =C2=A0 =C2=A0 [ = ] social
Response needed:=C2=A0 [ ] yes=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 [ ] up to you=C2=A0 [ ] no
Time-sensitive:=C2=A0=C2=A0 [ ] immediat= e=C2=A0 =C2=A0 [ ] soon=C2=A0 =C2=A0 =C2=A0=C2=A0 [ ] none
--089e010d81b634495a04fefd6e1f--