Passing through usb device does not follow default mode value (0660) after plugged out and plugged in.
Client version: 3.15
Server version: 3.15
Steps to reproduce:
lxc config device add neverland usb:01 usb vendorid=\<vid> productid=\<pid>
In Container:ls -la /dev/bus/usb/00x/00y
crw-rw----. 1 root root 189, 4 Aug 7 19:01 /dev/bus/usb/00x/00y
#Plug out the usb device and plug back in.
In Container:ls -la /dev/bus/usb/00x/00y
crw-------. 1 root root 189, 4 Aug 7 19:02 /dev/bus/usb/00x/00y
It can be resolved by remove/detach the device from the container and insert the mode argument, i.e.
lxc config device add neverland usb:01 usb vendorid=\<vid> productid=\<pid> mode=0600
Then, ls -la /dev/bus/usb/00x/00y
will result:
crw-rw----. 1 root root 189, 4 Aug 7 19:01 /dev/bus/usb/00x/00y
(same mode result even after the device is plugged out and plugged back in later)