You are not logged in.
Pages: 1
So, I have this weird problem - udev automounting does not allow normal user to write to usb device.
/etc/fstab:
/dev/sdc1 /media/usbhd-sdc1 vfat users,exec,dev,suid 0 1
/etc/rules.d/10-my-udev.rules:
KERNEL!="sd[a-z][0-9]", GOTO="mnt_auto_mount_end"
ACTION=="add", RUN+="/bin/mkdir /media/usbhd-%k", RUN+="/bin/mount /dev/%k"
ACTION=="remove", RUN+="/bin/umount -l /media/usbhd-%k", RUN+="/bin/rmdir /media/usbhd-%k"
LABEL="mnt_auto_mount_end"
When I manually do:
$ mount /dev/sdxy
it works nicely, but when i do it with 'sudo' it's the same as udev. So I guess that's something with udev. Can any1 help me?
Last edited by muchzill4 (2009-12-02 20:29:38)
Offline
What filesystem is on your flash drive? If it's FAT, there's no concept of ownership, so linux will just make the user running mount own everything, hence permissions problems when root mounts it. I believe RUN+="/bin/mount -o uid=<your uid>,gid=<your gid> /dev/%k" or RUN+="/bin/mount -o umask=000 /dev/%k" will make it writeable by you and the world, respectively. If the second solution is too insecure but you need multiple users to be able to access mounted flash drives, check out HAL.
Offline
Tyvm, works.
Offline
Pages: 1