Created
June 19, 2018 14:14
-
-
Save xsephiroth/35db073b57dd5a9e7f66c17c795d0b9e to your computer and use it in GitHub Desktop.
udev mount usb by pid uid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/udev/rules.d/50-usb-mount.rules | |
ACTION=="add",ATTRS{idVendor}=="0951",ATTRS{idProduct}=="1643",RUN+="/bin/mkdir -p /media/abc",RUN+="/bin/mount -o relatime,sync,utf8,uid=1000,gid=1000,umask=002 /dev/%k /media/abc" | |
ACTION=="remove",ATTRS{idVendor}=="0951",ATTRS{idProduct}=="1643",RUN+="/bin/umount -l /media/acc",RUN+="/bin/rmdir /media/abc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment