[OpenIndiana-discuss] How to mount usb devices?

Udo Grabowski (IMK) udo.grabowski at kit.edu
Mon Mar 29 09:34:19 UTC 2021



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



More information about the openindiana-discuss mailing list