I am using ubuntu 10.04 LTS - Locid Lynx. I have a requirement to set specific group and permissions for any usb stick file/directories on mount. I have tried overwriting the udev rules. Here is what I have done:

Created 99-test.rules under /etc/udev/rules.d/ directory with content as SUBSYSTEMS=="usb",GROUP="tomcat6",MODE="0777",NAME="test"

sudo service udev restart

Now when I mount the usb stick and run 'sudo blkid', it prints

/dev/test: UUID="002A-0AA5" TYPE="vfat"

But the ls -l /media/ gives back

drwx------ 4 admin admin 8192 1969-12-31 16:00 002A-0AA5

It seems that above rule from 99-test.rules is getting applied but getting overwritten afterwards, thus changing group and permissions back to some default value. What is it I am missing here? Do I have to change anything else?

An aside: I gather from the name that you are testing this rule, but before you actually put it in place you might want to add something like KERNEL=="sd?1" so it does only apply to USB storage devices (and not cameras, audio devices, etc).
–
John S GruberAug 13 '12 at 17:36