udev Run commands not running

You must use full path in the RUN key because (man udev)

If no absolute path is given, the program is expected to live in /lib/udev, otherwise the absolute path must be specified. Program name and arguments are separated by spaces. Single quotes can be used to specify arguments with spaces.

Nevertheless the (bash) script itself should behave as normal, that is you don't need to specify the path.


I was having the same problem with udev. I tried almost everything to get to scripts to work when adding and removing devices.

This is the code I made:

ACTION=="add", KERNEL=="sda1", SUBSYSTEMS=="scsi", ATTRS{model}=="AVV207-0        ", SYMLINK+="Lacie", MODE="0666", RUN+="/bin/sh /usr/bin/udev/lacie-add.sh", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sda1", RUN+="/bin/sh /usr/bin/udev/lacie-del.sh", OPTIONS="last_rule"

Adding the OPTIONS="last_rule" parameter did the trick.


I've had this issue as well, and I can confirm as of 12.04 you need to specify the full bash path and full bash script for the RUN command to work.