Help creating udev rule

jorgeg73

New Member
Jan 2, 2023
11
0
1
Hello all. I have install NUT (UPS monitor) on a lxc CT on proxmox. I have a usb hub and i am connecting 2 UPS and that hub.
When i reboot my proxmox, the access for those usb ports change. Need to be 666 so NUT can read the information on the UPS and after reboot it goes to 662.
I have read but can not get it work so here is my information.
Thanks for all teh help.
Any more information glad to share

SUBSYSTEMS=="usb", ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0002", GROUP="users", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0501", GROUP="users", MODE="0666"


I name my file 01-ups-nut.rules, Do not know if the file has to have a particular name.

lsusb
Bus 001 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 001 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply


usb-devices


T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=051d ProdID=0002 Rev=00.90
S: Manufacturer=American Power Conversion
S: Product=Back-UPS NS 675M1 FW:930.a8 .D USB FW:a8
S: SerialNumber=XXXXXXXXXXX
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=2mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbfs
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=100ms

T: Bus=01 Lev=02 Prnt=03 Port=03 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0764 ProdID=0501 Rev=02.00
S: Manufacturer=CPS
S: Product=BRG850AVRLCD
S: SerialNumber=XXXXXXXXXXXXXXXXXXXX
C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=2mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbfs
E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=10ms
 
What does cat /etc/pve/lxc/{CTID}.conf look like?
arch: amd64
cores: 1
features: fuse=1,nesting=1
hostname: NUCups
memory: 512
net0: name=eth0,bridge=vmbr0,firewall=1,gw=10.1.26.1,hwaddr=BC:24:11:8B:EF:9B,ip=10.1.26.2/24,tag=26,type=veth
onboot: 1
ostype: debian
rootfs: local:105/vm-105-disk-0.raw,size=3G
swap: 512
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/001 dev/bus/usb/001 none bind,optional,create=dir 0,0
 
What does ls -la /dev/bus/usb/001 show on host.


Don't know what that "0,0" is at the end.
I was following a tutorial. Me either I can erase it no problem. Already erase the 0,0
Host
ls -al /de/bus/usb/001
crw-rw-rw- 1 root users 189, 6 may 8 09:52 007
crw-rw-rw- 1 root users 189, 7 may 8 08:56 008


Lxc
ls -al /de/bus/usb/001
crw-rw-rw- 1 root users 189, 6 may 8 09:52 007
crw-rw-rw- 1 root users 189, 7 may 8 08:56 008
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!