What permissions should a udev rule have for a USB device? 644? 755?
For example on Ubuntu I'm looking at this file: /etc/udev/rules.d/99-lpcscrypt.rules
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThere's no reason to make a udev rule executable. They aren't executable (the kernel wouldn't do anything with them) and udev doesn't attach a special meaning to executable rule files.
A udev rule must not be writable to non-root user. A user who modifies it could inject arbitrary code that is run as root.
Udev rules don't normally contain anything confidential. Pretty much any information that's there can be revealed through /sys
interfaces, /dev
entries, ps
calls while a RUN
directive is running, etc.
So the right permissions are 644.