SUMMARY: /etc/minor_perm apparently being ignored?

From: James Noyes (SunManagers) <jnoyes-sml_at_retrogeeks.com>
Date: Fri Jul 25 2014 - 11:47:23 EDT
So, I received no replies/suggestions from the list, save for a single  
message complimenting the way I stated my problem.  However, I did  
continue to pursue solutions, since the problem defied logic.

Buried at the *very end* of Oracle's "Solaris Ready USB FAQ":
     
http://www.oracle.com/technetwork/server-storage/solaris/overview/usb-faq-140616.html
I finally found the hint that got me a solution:
----------------------------------
In Oracle Solaris release earlier than Oracle Solaris 10 Update 2,  
when you need to manually bind ugen driver, the device permissions are  
decided by the -m option used with add_drv command. For example, if  
you bind ugen driver by

# add_drv -m '* 0666 root sys' ugen

It means the ugen device nodes are owned by root, but are readable and  
writable by other users.
...
In latest Oracle Solaris 11 or Oracle Solaris 10 Update 2 and later  
releases, when you no longer bind ugen driver manually, the ugen  
permissions are given to console login user. So you have to log on  
console to be able to access the ugen nodes. Refer to logindevperm(4).
----------------------------------
So at the bottom of /etc/logindeverm, I found the culprit:

/dev/console   0600    /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/*  
driver=scsa2usb,usb_mid,usbprn,ugen     #libusb/ugen devices

Despite the FAQ mentioning "when you no longer bind ugen driver  
manually", this logindevperm setting actually takes precedence over  
the manual ugen binding and the settings in /etc/minor_perm.

Since this system is a headless server, and rarely if ever has anyone  
logged into the console (and even then, there's no need for the  
console user to own EVERY scsa2usb/usb_mid/usbprn/ugen device), I  
commented out that line, rebooted, and AMAZINGLY /etc/minor_perm did  
exactly what it was supposed to, and my USB UPS devices came up with  
the expected "666 root:sys" permissions I'd been trying to get all  
along.
Received on Fri Jul 25 11:50:26 2014

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 09:24:59 EDT