Set custom mount point and mount options for USB stick

Posted by kayahr on Server Fault See other posts from Server Fault or by kayahr
Published on 2010-12-31T12:17:43Z Indexed on 2010/12/31 12:55 UTC
Read the original article Hit count: 278

Filed under:
|
|
|

Hello,

I have an USB stick which contains private stuff like the SSH key. I want to mount this stick to my own home directory with 0700 permissions. Currently I do this with this line in /etc/fstab:

LABEL=KAYSTICK /home/k/.kaystick auto rw,user,noauto,umask=077,fmask=177 0 0

This works great but there is one minor problem: In Nautilus (The Gnome file manager) the mount point ".kaystick" is displayed. I guess Nautilus simply scans the /etc/fstab file and displays everything it finds there. This mount point is pretty useless because it can't be clicked when the device is not present and it can't be clicked when the device is present (Because then it is already mounted). I know this is a really minor problem because I could simply ignore it but I'm a perfectionist and so I want to get rid of this useless mount point in Nautilus.

Is there another way to customize the mount point and mount options for a specific USB device? Maybe it can be configured in udev? If yes, how?

© Server Fault or respective owner

Related posts about linux

Related posts about usb