My udev rule points to a bash script with two commands. While the first command echo runs fine, the second line ifuse seems not to be executed.

$ cat /etc/udev/rules.d/test.rules

ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12a8/804", ENV{INTERFACE}=="255/253/1" RUN+="/bin/sh /home/user/test.sh"

$ cat /home/user/test.sh

echo "Phone connected" >> /home/user/test.log
sleep 3
/usr/bin/ifuse /home/user/media/iOS


  • ifuse works if I execute the script manually: $ sh test.sh
  • Replacing the udev RUN+ statement with "/bin/su user -c /home/user/test.sh" doesn't help
  • Man page ifuse: https://www.mankier.com/1/ifuse

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.