LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Debian and removable devices. (https://www.linuxquestions.org/questions/debian-26/debian-and-removable-devices-288112/)

Sslaxx 02-09-2005 10:13 AM

Debian and removable devices.
 
Problem with Debian (Sarge, kernel 2.6.8) and a removable drive (a USB memory stick):

Debian can pick up the memory stick. However, it is not auto-mounted by GNOME. I can only mount it via root (as /dev/sdb1), which means only root can write to the device. What I want is for it to be detected, then mounted and usable by the current user.

Advice?

corfe 02-09-2005 12:23 PM

You'll have to edit /etc/fstab and add the option "users" to make it mountable by all users, and give the appropriate users permissions to the mount folder if you want them to have access to it.

You also might want to use the mount option "umask=000" in fstab, assuming the stick if fat32 - since fat32 stores no permissions information, linux defaults to giving nobody but root permissions to it, but this option gives everyone access to the files on the mounted device.

As far as the auto-mounting, I'm not sure, but I believe what you're looking for is called "supermount". You "supermount" a removable drive to a folder, and then the kernel automatically mounts and unmounts it when the device is inserted / removed - if you go to the directory and the device is unplugged, you just won't see any files, if it's plugged in you will. I believe this is not part of the standard kernel and you'll need to find a patched kernel that has supermount in it, or apply the patch yourself.

Alternatively, a less-bulletproof solution is to install "hotplug", which is a way to tell the computer to do certain things when certain USB devices are plugged in. For example, you could install hotplug and configure it to check the ID / serial number of the device, and if it's your USB stick, run your script, which will mount it at the appropriate place making it available to all users, and do pretty much whatever else you want (you could have it play a sound when you plug it in, or anything you can do in a script). I believe gnome's interface will allow for intelligent methods of unmounting it through the GUI.

Sslaxx 02-09-2005 01:24 PM

Thanks!
 
Made the requisite changed to fstab and it works fine.


All times are GMT -5. The time now is 12:36 AM.