Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu 12.04 64b mounts usb drives (hdd & flash) at /media/{DISK-LABEL} and assigns always 700 permissions.

I've written an udev rule in /etc/udev/rules to assign 0755 permissions:

SUBSYSTEMS=="usb", KERNEL=="sd?[1-4]", ACTION=="add|change", MODE="0755", RUN+="/bin/sh -c '/bin/echo hello >> /home/miguel/ok.txt'"

The RUN part is for test the rule. Well, when I insert a pendrive the ok.txt file is created (the rule is triggered) but the permissions are 700, not 755. I think that the rule is being overwritten but I don't know how to avoid this. Any idea?

Thanks

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.