UPS support over USB broken in 8.0.1-B4 due to missing USB permissions for uucp

Status
Not open for further replies.

Tekkie

Patron
Joined
May 31, 2011
Messages
353
Ticket: https://support.freenas.org/ticket/546

Jul 23 10:25:49 shrek freenas: Network UPS Tools - APC Smart protocol driver 2.00 (2.4.1)
Jul 23 10:25:49 shrek freenas: APC command table version 2.0
Jul 23 10:25:49 shrek freenas:
Jul 23 10:25:49 shrek freenas: Unable to open /dev/ugen0.2: Permission denied
Jul 23 10:25:49 shrek freenas:
Jul 23 10:25:49 shrek freenas: Current user id: uucp (66)
Jul 23 10:25:49 shrek freenas: Serial port owner: root (0)
Jul 23 10:25:49 shrek freenas: Serial port group: operator (5)
Jul 23 10:25:49 shrek freenas: Mode of port: 0600
Jul 23 10:25:49 shrek freenas:
Jul 23 10:25:49 shrek freenas: Things to try:
Jul 23 10:25:49 shrek freenas:
Jul 23 10:25:49 shrek freenas: - Use another port (with the right permissions)
Jul 23 10:25:49 shrek freenas:
Jul 23 10:25:49 shrek freenas: - Fix the port owner/group or permissions on this port
Jul 23 10:25:49 shrek freenas:
Jul 23 10:25:49 shrek freenas: - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
Jul 23 10:25:49 shrek freenas: See upsdrvctl(8) and ups.conf(5).

More background info on UPS & USB in FreeBSD: http://people.freebsd.org/~thierry/nut_FreeBSD_HowTo.txt
 

cbray

Explorer
Joined
Jun 16, 2011
Messages
68
UPS service

From other thread:
http://forums.freenas.org/showthread.php?912-How-to-configure-the-UPS-port/page2

CBRay:
I used: chmod 777 /dev/ugen1.2

Then the UPS service did start.
But after that, you can put anything into the port field in the gui, and the UPS will still start. Just as long as it is not blank.

I haven't received any replies to this, and am wondering if anyone noticed this msg or tried to put anything into the GUI UPS field other than correct USB port or Blank, and had UPS service fail.:confused:

I am just not altogether sure that the UPS service is working properly AFTER the 777 mod.

From Tekkie's link, mentioned install with a default USER:
By default, it will run as the user "uucp", but if you install as a port
you can change that by defining NUT_USER=name_the_account.

To which again I ask:
Does the system need a user entry for UPS similar to other daemons ?
Thanks,
Peace,
CB
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
The UPS daemon runs under the uucp account see the output of my log above, the problem is that this user is not mapped through devfs to have access to the USB port in question, which causes the failure.
 

cbray

Explorer
Joined
Jun 16, 2011
Messages
68
UPS doesn't even need a port in the GUI.

So as long as I use chmod 777 /dev/ugen1.2 to allow access by uucp to the port 1.2,
it's perfectly ok to enter 'hall of the mountain king' as port for UPS service in GUI.
After that,:mad: I can expect the UPS service to work perfectly huh? Try it, it works.
access to the USB port in question
Seems like I'm missing something here huh?:mad:
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
I am not sure about the 'hall of the mountain king' as USB port in the GUI, I haven't checked the nut config files in detail to know what exactly the GUI writes into those, so I can't answer your question sorry.
 
Status
Not open for further replies.
Top