[OpenIndiana-discuss] How to mount usb devices?
Stephan Althaus
Stephan.Althaus at Duedinghausen.eu
Mon Mar 29 10:13:38 UTC 2021
On 03/29/21 12:06 PM, Udo Grabowski (IMK) wrote:
> On 29.03.21 11:59, Stephan Althaus wrote:
>> On 03/29/21 11:34 AM, Udo Grabowski (IMK) wrote:
>>>
>>>
>>> On 29.03.21 11:27, Apostolos Syropoulos via openindiana-discuss wrote:
>>>> On Monday, March 29, 2021, 12:10:20 PM GMT+3, Stephan Althaus
>>>> <stephan.althaus at duedinghausen.eu> wrote:
>>>>
>>>>> I tested this on a relatively new OI system where the user
>>>>> *should* be
>>>>> standard, and i get the same:
>>>>>
>>>>> a) The USB device gets connected ('hotplug') and is accessible via
>>>>> rmformat & friends
>>>>> b) The vfat partition on the USB stick is not mounted automatically
>>>>> c) only the root-role is allowed to mount the partition
>>>>>
>>>>> So the automount feature needs some additional magic to work, it does
>>>>> not work rightoutofthebox.
>>>>
>>>> I updated my system on 2021:03:18 and I reported this problem to this
>>>> list. I can mount a USB thumb disk using mount -F pcfs but the
>>>> automagic
>>>> thing is lost. However, when I insert a DVD into the DVD driver the
>>>> automount
>>>> thing works.
>>>
>>> The usual way this worked was via /etc/logindevperm :
>>>
>>> #
>>> # Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights
>>> reserved.
>>> #
>>> # /etc/logindevperm - login-based device permissions
>>> #
>>> # If the user is logging in on a device specified in the "console"
>>> field
>>> # of any entry in this file, the owner/group of the devices listed
>>> in the
>>> # "devices" field will be set to that of the user. Similarly, the mode
>>> # will be set to the mode specified in the "mode" field.
>>> #
>>> # If the "console" is "/dev/vt/console_user" which is a symlink to
>>> the current
>>> # active virtual console (/dev/console, or /dev/vt/#), then the first
>>> # user to log into any virtual console will get ownership of all the
>>> # devices until they log out.
>>> #
>>> # "devices" is a colon-separated list of device names. A device name
>>> # ending in "/*", such as "/dev/fbs/*", specifies all entries
>>> (except "."
>>> # and "..") in a directory. A '#' begins a comment and may appear
>>> # anywhere in an entry.
>>> # In addition, regular expressions may be used. Refer to
>>> logindevperm(4)
>>> # man page.
>>> # Note that any changes in this file should be made when logged in as
>>> # root as devfs provides persistence on minor node attributes.
>>> #
>>> # console mode devices
>>> #
>>> /dev/vt/console_user 0600 /dev/mouse:/dev/kbd
>>> /dev/vt/console_user 0600 /dev/sound/* # audio devices
>>> /dev/vt/console_user 0666 /dev/fbs/* # frame buffers
>>> /dev/vt/console_user 0600 /dev/dri/* # dri devices
>>> /dev/vt/console_user 0400 /dev/removable-media/dsk/* #
>>> removable media
>>> /dev/vt/console_user 0400 /dev/removable-media/rdsk/* #
>>> removable media
>>> /dev/vt/console_user 0400 /dev/hotpluggable/dsk/* #
>>> hotpluggable storage
>>> /dev/vt/console_user 0400 /dev/hotpluggable/rdsk/* #
>>> hotpluggable storage
>>> /dev/vt/console_user 0600 /dev/video[0-9]+ # video devices
>>> /dev/vt/console_user 0600 /dev/usb/hid[0-9]+ # hid
>>> devices should have the same permission with conskbd and consms
>>> /dev/vt/console_user 0600 /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/*
>>> driver=scsa2usb,usb_mid,usbprn,ugen #libusb/ugen devices
>>> /dev/vt/console_user 0666 /dev/nvidia[0-9a-f]+ # Nvidia
>>> /dev/vt/console_user 0666 /dev/console # workaround
>>> for defect.opensolaris.org 12133
>>>
>>>
>>>
>>> _______________________________________________
>>> openindiana-discuss mailing list
>>> openindiana-discuss at openindiana.org
>>> https://openindiana.org/mailman/listinfo/openindiana-discuss
>>
>> Hm...
>> Whichever service should change the ownership of the devices, it
>> doesn't seem to work here.
>>
>> Or am i looking the 'wrong way' ?
>>
>> steven at fuji:~$ ls -l /dev/vt
>> total 0
>> crw------- 1 root root 245, 0 Mar 29 09:19 0
>> crw------- 1 root root 245, 1 Mar 29 09:19 1
>> ...<snip>
>> crw------- 1 root root 245, 6 Mar 29 09:19 6
>> crw--w---- 1 steven tty 245, 7 Mar 29 09:19 7
>> crw------- 1 root root 245, 8 Mar 29 09:19 8
>> crw------- 1 root root 245, 9 Mar 29 09:19 9
>> lrwxrwxrwx 1 root root 1 Mar 29 09:19 active -> 7
>> lrwxrwxrwx 1 root root 0 Mar 29 09:19 console_user -> 7
>>
>> steven at fuji:~$ ls -l /dev/usb/mass-storage0
>>
>> lrwxrwxrwx 1 root root 56 Mar 29 09:55
>> /dev/usb/mass-storage0 ->
>> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2:scsa2usb
>>
>> steven at fuji:~$ ls -l /devices/pci at 0,0/pci1734,11f3 at 14/storage at 2:scsa2usb
>> crw------- 1 root sys 185, 512 Mar 29 09:55
>> /devices/pci at 0,0/pci1734,11f3 at 14/storage at 2:scsa2usb
>>
>> steven at fuji:~$ ls -l /dev/removable-media/dsk/c12t0d0
>> lrwxrwxrwx 1 root root 17 Mar 2 10:47
>> /dev/removable-media/dsk/c12t0d0 -> ../../dsk/c12t0d0
>>
>> steven at fuji:~$ ls -l /dev/hotpluggable/dsk/c12*
>> lrwxrwxrwx 1 root root 17 Mar 2 10:47
>> /dev/hotpluggable/dsk/c12t0d0 -> ../../dsk/c12t0d0
>> ...
> Links don't change ownership, you have to look at the targets (-L)
>
>
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
Ok. The link targets arw owner root:
steven at fuji:~$ ls -l /dev/usb/mass-storage0
lrwxrwxrwx 1 root root 56 Mar 29 10:54
/dev/usb/mass-storage0 ->
../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2:scsa2usb
steven at fuji:~$ ls -l /devices/pci at 0,0/pci1734,11f3 at 14/storage at 2:scsa2usb
crw------- 1 root sys 185, 512 Mar 29 10:54
/devices/pci at 0,0/pci1734,11f3 at 14/storage at 2:scsa2usb
steven at fuji:~$ ls -l /dev/dsk/c12*
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0p0
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:q
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0p1
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:r
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0p2
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:s
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0p3
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:t
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0p4
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:u
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s0
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:a
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s1
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:b
lrwxrwxrwx 1 root root 58 Feb 4 20:07
/dev/dsk/c12t0d0s10 ->
../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:k
lrwxrwxrwx 1 root root 58 Feb 4 20:07
/dev/dsk/c12t0d0s11 ->
../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:l
lrwxrwxrwx 1 root root 58 Feb 4 20:07
/dev/dsk/c12t0d0s12 ->
../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:m
lrwxrwxrwx 1 root root 58 Feb 4 20:07
/dev/dsk/c12t0d0s13 ->
../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:n
lrwxrwxrwx 1 root root 58 Feb 4 20:07
/dev/dsk/c12t0d0s14 ->
../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:o
lrwxrwxrwx 1 root root 58 Feb 4 20:07
/dev/dsk/c12t0d0s15 ->
../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:p
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s2
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:c
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s3
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:d
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s4
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:e
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s5
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:f
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s6
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:g
lrwxrwxrwx 1 root root 58 Mar 29 09:55 /dev/dsk/c12t0d0s7
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:h
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s8
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:i
lrwxrwxrwx 1 root root 58 Feb 4 20:07 /dev/dsk/c12t0d0s9
-> ../../devices/pci at 0,0/pci1734,11f3 at 14/storage at 2/disk at 0,0:j
steven at fuji:~$ ls -l /devices/pci at 0,0/pci1734,11f3 at 14/storage at 2
total 1
drwxr-xr-x 2 root sys 2 Feb 4 20:07 disk at 0,0
br-------- 1 root root 187, 1024 Feb 4 20:07 disk at 0,0:a
cr-------- 1 root root 187, 1024 Feb 4 20:07 disk at 0,0:a,raw
br-------- 1 root root 187, 1025 Feb 4 20:07 disk at 0,0:b
cr-------- 1 root root 187, 1025 Feb 4 20:07 disk at 0,0:b,raw
br-------- 1 root root 187, 1026 Feb 4 20:07 disk at 0,0:c
cr-------- 1 root root 187, 1026 Feb 4 20:07 disk at 0,0:c,raw
br-------- 1 root root 187, 1027 Feb 4 20:07 disk at 0,0:d
cr-------- 1 root root 187, 1027 Feb 4 20:07 disk at 0,0:d,raw
br-------- 1 root root 187, 1028 Feb 4 20:07 disk at 0,0:e
cr-------- 1 root root 187, 1028 Feb 4 20:07 disk at 0,0:e,raw
br-------- 1 root root 187, 1029 Feb 4 20:07 disk at 0,0:f
cr-------- 1 root root 187, 1029 Feb 4 20:07 disk at 0,0:f,raw
br-------- 1 root root 187, 1030 Feb 4 20:07 disk at 0,0:g
cr-------- 1 root root 187, 1030 Feb 4 20:07 disk at 0,0:g,raw
br-------- 1 root root 187, 1031 Feb 4 20:07 disk at 0,0:h
cr-------- 1 root root 187, 1031 Feb 4 20:07 disk at 0,0:h,raw
br-------- 1 root root 187, 1032 Feb 4 20:07 disk at 0,0:i
cr-------- 1 root root 187, 1032 Feb 4 20:07 disk at 0,0:i,raw
br-------- 1 root root 187, 1033 Feb 4 20:07 disk at 0,0:j
cr-------- 1 root root 187, 1033 Feb 4 20:07 disk at 0,0:j,raw
br-------- 1 root root 187, 1034 Feb 4 20:07 disk at 0,0:k
cr-------- 1 root root 187, 1034 Feb 4 20:07 disk at 0,0:k,raw
br-------- 1 root root 187, 1035 Feb 4 20:07 disk at 0,0:l
cr-------- 1 root root 187, 1035 Feb 4 20:07 disk at 0,0:l,raw
br-------- 1 root root 187, 1036 Feb 4 20:07 disk at 0,0:m
cr-------- 1 root root 187, 1036 Feb 4 20:07 disk at 0,0:m,raw
br-------- 1 root root 187, 1037 Feb 4 20:07 disk at 0,0:n
cr-------- 1 root root 187, 1037 Feb 4 20:07 disk at 0,0:n,raw
br-------- 1 root root 187, 1038 Feb 4 20:07 disk at 0,0:o
cr-------- 1 root root 187, 1038 Feb 4 20:07 disk at 0,0:o,raw
br-------- 1 root root 187, 1039 Feb 4 20:07 disk at 0,0:p
cr-------- 1 root root 187, 1039 Feb 4 20:07 disk at 0,0:p,raw
br-------- 1 root root 187, 1040 Mar 22 12:23 disk at 0,0:q
cr-------- 1 root root 187, 1040 Mar 2 11:08 disk at 0,0:q,raw
br-------- 1 root root 187, 1041 Feb 4 20:07 disk at 0,0:r
cr-------- 1 root root 187, 1041 Feb 4 20:07 disk at 0,0:r,raw
br-------- 1 root root 187, 1042 Feb 4 20:07 disk at 0,0:s
cr-------- 1 root root 187, 1042 Feb 4 20:07 disk at 0,0:s,raw
br-------- 1 root root 187, 1043 Feb 4 20:07 disk at 0,0:t
cr-------- 1 root root 187, 1043 Feb 4 20:07 disk at 0,0:t,raw
br-------- 1 root root 187, 1044 Feb 4 20:07 disk at 0,0:u
cr-------- 1 root root 187, 1044 Feb 4 20:07 disk at 0,0:u,raw
More information about the openindiana-discuss
mailing list