I want to define a udev rule for a particular block device (or partition). I currently do it by defining a
91-my-custom-rules.rules configuration file as follows:
computer:/etc/udev/rules.d # cat 91-my-custom-rules.rules KERNEL=="sdc2", OWNER="username", GROUP="users", MODE="0600"
The above example changes the ownership of
username:users and sets its permissions to
For obvious reasons,
/dev/sdc2 might not always point to the exact same device/partition. Therefore, I'd like to define a rule for a disk by id or uuid instead. How can I do this?