Gentoo Archives: gentoo-user

From: Joseph <syscon780@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] USB permission/owner - change not allowed as root
Date: Tue, 31 Dec 2013 16:06:44
Message-Id: 20131231160638.GQ15186@syscon7.ed.shawcable.net
In Reply to: Re: [gentoo-user] USB permission/owner - change not allowed as root by Alan McKinnon
1 On 12/31/13 10:49, Alan McKinnon wrote:
2 >On 30/12/2013 19:22, Joseph wrote:
3 >> On 12/30/13 17:36, Randolph Maaßen wrote:
4 >> [snip]
5 >>>>
6 >>>> With the line in fstab:
7 >>>>
8 >>>> /dev/sdb1 /media/stick auto noauto,rw,users
9 >>>> 0 0
10 >>>>
11 >>>> Some USB stick are mounted as root:root and I can not change that
12 >>>> even as
13 >>>> root.
14 >>>> When I remove this like from fstab.
15 >>>> The USB stick are mounting correctly as joseph:users owner except
16 >>>> they have
17 >>>> different mounting location which I don't like.
18 >>>>
19 >>>> --
20 >>>> Joseph
21 >>>>
22 >>>
23 >>> You can specify the user/group that mounts a device with some mount
24 >>> options. I think they are uid=<username>/gid=<groupname> but I'm not
25 >>> sure and unfortunatly not on my Linux box at the moment.
26 >>
27 >> I've tried in fstab:
28 >> /dev/sdb1 /media/stick auto
29 >> noauto,uid=1000,gid=100,umask=077 0 0
30 >>
31 >> but I'm getting an error:
32 >> Error mounting system-managed device /dev/sdb1: Command-line `mount
33 >> "/media/stick"' exited with non-zero exit status 32: mount: wrong fs
34 >> type, bad option, bad superblock on /dev/sdb1,
35 >>
36 >> What am I missing?
37 >>
38 >
39 >mount cannot auto-identify the fs type on your USB stick, or /dev/sdb1
40 >is the wrong node.
41 >
42 >blkid as Bruce mentioned will help identify what is really going on.
43 >Also, tail -f /var/log/messages, insert the stick, and post the entries
44 >that produces.
45 >
46 >
47 >
48 >
49 >--
50 >Alan McKinnon
51 >alan.mckinnon@×××××.com
52
53 Thank you for the hints, here is the output of: tail -f /var/log/messages
54 My line if fstab is:
55 /dev/sdb1 /media/stick auto noauto,rw,user
56 and this USB below file are mounted as root:root (not joseph:users)
57
58 Dec 31 09:02:16 syscon7 kernel: [231771.029376] usb 8-1: new high-speed USB device number 33 using xhci_hcd
59 Dec 31 09:02:16 syscon7 kernel: [231771.042189] usb 8-1: default language 0x0409
60 Dec 31 09:02:16 syscon7 kernel: [231771.043442] usb 8-1: udev 33, busnum 8, minor = 928
61 Dec 31 09:02:16 syscon7 kernel: [231771.043445] usb 8-1: New USB device found, idVendor=058f, idProduct=6366
62 Dec 31 09:02:16 syscon7 kernel: [231771.043447] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
63 Dec 31 09:02:16 syscon7 kernel: [231771.043448] usb 8-1: Product: Mass Storage Device
64 Dec 31 09:02:16 syscon7 kernel: [231771.043450] usb 8-1: Manufacturer: Generic
65 Dec 31 09:02:16 syscon7 kernel: [231771.043451] usb 8-1: SerialNumber: 058F63666433
66 Dec 31 09:02:16 syscon7 kernel: [231771.043515] usb 8-1: usb_probe_device
67 Dec 31 09:02:16 syscon7 kernel: [231771.043517] usb 8-1: configuration #1 chosen from 1 choice
68 Dec 31 09:02:16 syscon7 kernel: [231771.043614] usb 8-1: Successful Endpoint Configure command
69 Dec 31 09:02:16 syscon7 kernel: [231771.043689] usb 8-1: adding 8-1:1.0 (config #1, interface 0)
70 Dec 31 09:02:16 syscon7 kernel: [231771.043722] usb-storage 8-1:1.0: usb_probe_interface
71 Dec 31 09:02:16 syscon7 kernel: [231771.043726] usb-storage 8-1:1.0: usb_probe_interface - got id
72 Dec 31 09:02:16 syscon7 kernel: [231771.043728] usb-storage 8-1:1.0: USB Mass Storage device detected
73 Dec 31 09:02:16 syscon7 kernel: [231771.043787] scsi41 : usb-storage 8-1:1.0
74 Dec 31 09:02:17 syscon7 kernel: [231772.175846] scsi 41:0:0:0: Direct-Access Multiple Card Reader 1.00 PQ: 0 ANSI: 0
75 Dec 31 09:02:17 syscon7 kernel: [231772.176055] sd 41:0:0:0: Attached scsi generic sg2 type 0
76 Dec 31 09:02:18 syscon7 kernel: [231772.836523] sd 41:0:0:0: [sdb] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
77 Dec 31 09:02:18 syscon7 kernel: [231772.836932] sd 41:0:0:0: [sdb] Write Protect is off
78 Dec 31 09:02:18 syscon7 kernel: [231772.836934] sd 41:0:0:0: [sdb] Mode Sense: 03 00 00 00
79 Dec 31 09:02:18 syscon7 kernel: [231772.837316] sd 41:0:0:0: [sdb] No Caching mode page present
80 Dec 31 09:02:18 syscon7 kernel: [231772.837318] sd 41:0:0:0: [sdb] Assuming drive cache: write through
81 Dec 31 09:02:18 syscon7 kernel: [231772.838812] sd 41:0:0:0: [sdb] No Caching mode page present
82 Dec 31 09:02:18 syscon7 kernel: [231772.838815] sd 41:0:0:0: [sdb] Assuming drive cache: write through
83 Dec 31 09:02:18 syscon7 kernel: [231772.846512] sdb: sdb1
84 Dec 31 09:02:18 syscon7 kernel: [231772.848062] sd 41:0:0:0: [sdb] No Caching mode page present
85 Dec 31 09:02:18 syscon7 kernel: [231772.848065] sd 41:0:0:0: [sdb] Assuming drive cache: write through
86 Dec 31 09:02:18 syscon7 kernel: [231772.848067] sd 41:0:0:0: [sdb] Attached SCSI removable disk
87 Dec 31 09:02:25 syscon7 udisksd[3624]: Mounted /dev/sdb1 (system) at /media/stick on behalf of uid 1000
88
89 --
90 Joseph

Replies

Subject Author
Re: [gentoo-user] USB permission/owner - change not allowed as root Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] USB permission/owner - change not allowed as root Bruce Hill <daddy@×××××××××××××××××××××.com>