File: 52-usb.rules

package info (click to toggle)
uhubctl 2.6.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 212 kB
  • sloc: ansic: 1,012; makefile: 42; ruby: 20
file content (24 lines) | stat: -rw-r--r-- 901 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# uhubctl – USB hub per-port power control https://github.com/mvp/uhubctl
#
# Copyright (c) 2009-2024, Vadim Mikhailov
#
# This file can be distributed under the terms and conditions of the
# GNU General Public License version 2.

# uhubctl udev rules for rootless operation on Linux for users in group `dialout`.
#
# Copy this file to /etc/udev/rules.d, then reboot or run:
#
#   sudo udevadm trigger --attr-match=subsystem=usb
#
# To add yourself to this permission group, run:
#
#   sudo usermod -a -G dialout $USER

# This is for Linux before 6.0:
SUBSYSTEM=="usb", DRIVER=="usb", MODE="0664", GROUP="dialout"

# This is for Linux 6.0 or later (ok to keep this block present for older Linux kernels):
SUBSYSTEM=="usb", DRIVER=="usb", \
  RUN+="/bin/sh -c \"chown -f root:dialout $sys$devpath/*-port*/disable || true\"" \
  RUN+="/bin/sh -c \"chmod -f 660 $sys$devpath/*-port*/disable || true\""