On 12/31/13 10:49, Alan McKinnon wrote:
On 30/12/2013 19:22, Joseph wrote:
On 12/30/13 17:36, Randolph Maaßen wrote:
[snip]

With the line in fstab:

/dev/sdb1               /media/stick    auto            noauto,rw,users
0  0

Some USB stick are mounted as root:root and I can not change that
even as
root.
When I remove this like from fstab.
The USB stick are mounting correctly as joseph:users owner except
they have
different mounting location which I don't like.

--
Joseph


You can specify the user/group that mounts a device with some mount
options. I think they are uid=<username>/gid=<groupname> but I'm not
sure and unfortunatly not on my Linux box at the moment.

I've tried in fstab:
/dev/sdb1               /media/stick    auto
noauto,uid=1000,gid=100,umask=077        0  0

but I'm getting an error:
Error mounting system-managed device /dev/sdb1: Command-line `mount
"/media/stick"' exited with non-zero exit status 32: mount: wrong fs
type, bad option, bad superblock on /dev/sdb1,

What am I missing?


mount cannot auto-identify the fs type on your USB stick, or /dev/sdb1
is the wrong node.

blkid as Bruce mentioned will help identify what is really going on.
Also, tail -f /var/log/messages, insert the stick, and post the entries
that produces.




--
Alan McKinnon
alan.mckin...@gmail.com

Thank you for the hints, here is the output of: tail -f /var/log/messages
My line if fstab is: /dev/sdb1 /media/stick auto noauto,rw,user
and this USB below file are mounted as root:root (not joseph:users)

Dec 31 09:02:16 syscon7 kernel: [231771.029376] usb 8-1: new high-speed USB 
device number 33 using xhci_hcd
Dec 31 09:02:16 syscon7 kernel: [231771.042189] usb 8-1: default language 0x0409
Dec 31 09:02:16 syscon7 kernel: [231771.043442] usb 8-1: udev 33, busnum 8, 
minor = 928
Dec 31 09:02:16 syscon7 kernel: [231771.043445] usb 8-1: New USB device found, 
idVendor=058f, idProduct=6366
Dec 31 09:02:16 syscon7 kernel: [231771.043447] usb 8-1: New USB device 
strings: Mfr=1, Product=2, SerialNumber=3
Dec 31 09:02:16 syscon7 kernel: [231771.043448] usb 8-1: Product: Mass Storage 
Device
Dec 31 09:02:16 syscon7 kernel: [231771.043450] usb 8-1: Manufacturer: Generic
Dec 31 09:02:16 syscon7 kernel: [231771.043451] usb 8-1: SerialNumber: 
058F63666433
Dec 31 09:02:16 syscon7 kernel: [231771.043515] usb 8-1: usb_probe_device
Dec 31 09:02:16 syscon7 kernel: [231771.043517] usb 8-1: configuration #1 
chosen from 1 choice
Dec 31 09:02:16 syscon7 kernel: [231771.043614] usb 8-1: Successful Endpoint 
Configure command
Dec 31 09:02:16 syscon7 kernel: [231771.043689] usb 8-1: adding 8-1:1.0 (config 
#1, interface 0)
Dec 31 09:02:16 syscon7 kernel: [231771.043722] usb-storage 8-1:1.0: 
usb_probe_interface
Dec 31 09:02:16 syscon7 kernel: [231771.043726] usb-storage 8-1:1.0: 
usb_probe_interface - got id
Dec 31 09:02:16 syscon7 kernel: [231771.043728] usb-storage 8-1:1.0: USB Mass 
Storage device detected
Dec 31 09:02:16 syscon7 kernel: [231771.043787] scsi41 : usb-storage 8-1:1.0
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
Dec 31 09:02:17 syscon7 kernel: [231772.176055] sd 41:0:0:0: Attached scsi 
generic sg2 type 0
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)
Dec 31 09:02:18 syscon7 kernel: [231772.836932] sd 41:0:0:0: [sdb] Write 
Protect is off
Dec 31 09:02:18 syscon7 kernel: [231772.836934] sd 41:0:0:0: [sdb] Mode Sense: 
03 00 00 00
Dec 31 09:02:18 syscon7 kernel: [231772.837316] sd 41:0:0:0: [sdb] No Caching 
mode page present
Dec 31 09:02:18 syscon7 kernel: [231772.837318] sd 41:0:0:0: [sdb] Assuming 
drive cache: write through
Dec 31 09:02:18 syscon7 kernel: [231772.838812] sd 41:0:0:0: [sdb] No Caching 
mode page present
Dec 31 09:02:18 syscon7 kernel: [231772.838815] sd 41:0:0:0: [sdb] Assuming 
drive cache: write through
Dec 31 09:02:18 syscon7 kernel: [231772.846512]  sdb: sdb1
Dec 31 09:02:18 syscon7 kernel: [231772.848062] sd 41:0:0:0: [sdb] No Caching 
mode page present
Dec 31 09:02:18 syscon7 kernel: [231772.848065] sd 41:0:0:0: [sdb] Assuming 
drive cache: write through
Dec 31 09:02:18 syscon7 kernel: [231772.848067] sd 41:0:0:0: [sdb] Attached 
SCSI removable disk
Dec 31 09:02:25 syscon7 udisksd[3624]: Mounted /dev/sdb1 (system) at 
/media/stick on behalf of uid 1000

--
Joseph

Reply via email to