~alpine/users

1

[alpine-user] USB Permissions

Details
Message ID
<67f58f35-bd21-e78c-66c9-76b78f0c7305@garethwilliams.me.uk>
Sender timestamp
1532501433
DKIM signature
missing
Download raw message
Hi,

I'm trying to set up NUT (UPS tools) on Alpine 3.8.  I've compiled from 
edge and that stage seems to have worked fine.

The device is an EATON Ellipse ECO 800 UPS which uses USB for 
communicating with Alpine.  I've therefore also installed eudev to 
manage to USB permissions.

However, I can't get it to communicate.

I've added the UPS to ups.conf:

     [eaton]
     driver = usbhid-ups
     port = auto
     vendorid=0463
     desc = "Eaton UPS"

But when I try to start it, I get errors.  Running a strace on the driver:

     strace /usr/lib/nut/usbhid-ups -a eaton

results in (amongst other messages):

     stat("/sys/bus/usb/devices", 0x7639e69ffe80) = -1 EACCES 
(Permission denied)

Checking permissions with:

     ls -ld /sys/bus/usb/devices

     drwx------    2 root     root             0 Jul 24 19:41 
/sys/bus/usb/devices/

In fact, it is 0600 root:root all the way up to /sys/bus.

Shouldn't this be 0644 or similar, or maybe 0640 but with group 'usb'?

Kind regards,

Gareth Williams



---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---

[alpine-user] Re: USB Permissions

Details
Message ID
<d4384891-7f2e-d6db-4b2e-953a678ecc0f@garethwilliams.me.uk>
In-Reply-To
<67f58f35-bd21-e78c-66c9-76b78f0c7305@garethwilliams.me.uk> (view parent)
Sender timestamp
1532583533
DKIM signature
missing
Download raw message
To answer my own question and hopefully save someone else asking it:

The driver can't read /sys/bus and sub-directories because I had a 
hardened kernel installed and these kernels have the 
CONFIG_GRKERNSEC_SYSFS_RESTRICT config option enabled which disables 
read access to the whole /sys tree.  Changing the kernel to 
linux-vanilla fixed it.

Kind regards,

Gareth

On 25/07/2018 07:50, Gareth Williams wrote:
> Hi,
>
> I'm trying to set up NUT (UPS tools) on Alpine 3.8.  I've compiled 
> from edge and that stage seems to have worked fine.
>
> The device is an EATON Ellipse ECO 800 UPS which uses USB for 
> communicating with Alpine.  I've therefore also installed eudev to 
> manage to USB permissions.
>
> However, I can't get it to communicate.
>
> I've added the UPS to ups.conf:
>
>     [eaton]
>     driver = usbhid-ups
>     port = auto
>     vendorid=0463
>     desc = "Eaton UPS"
>
> But when I try to start it, I get errors.  Running a strace on the 
> driver:
>
>     strace /usr/lib/nut/usbhid-ups -a eaton
>
> results in (amongst other messages):
>
>     stat("/sys/bus/usb/devices", 0x7639e69ffe80) = -1 EACCES 
> (Permission denied)
>
> Checking permissions with:
>
>     ls -ld /sys/bus/usb/devices
>
>     drwx------    2 root     root             0 Jul 24 19:41 
> /sys/bus/usb/devices/
>
> In fact, it is 0600 root:root all the way up to /sys/bus.
>
> Shouldn't this be 0644 or similar, or maybe 0640 but with group 'usb'?
>
> Kind regards,
>
> Gareth Williams
>


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)