Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 02-09-2005, 11:13 AM   #1
Registered: Nov 2004
Location: Malvern, UK
Distribution: Debian Sarge (kernel 2.6.8)
Posts: 52

Rep: Reputation: 15
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.

Old 02-09-2005, 01:23 PM   #2
Registered: Dec 2004
Location: Washington State, USA
Distribution: Debian Sid
Posts: 128

Rep: Reputation: 16
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.
Old 02-09-2005, 02:24 PM   #3
Registered: Nov 2004
Location: Malvern, UK
Distribution: Debian Sarge (kernel 2.6.8)
Posts: 52

Original Poster
Rep: Reputation: 15

Made the requisite changed to fstab and it works fine.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
debian: two ethernet devices, only one works at a time petermbm Linux - Wireless Networking 3 09-29-2005 01:10 PM
Does dpkg work with removable devices? jolphil Debian 13 03-23-2005 04:14 PM
how to stop mandrake/kde from automounting nonexistent removable devices at startup? pdmackenzie Mandriva 3 11-08-2004 10:53 AM
How to use shell script to get removable devices? slownet Programming 2 03-23-2004 11:16 AM
ISA devices with debian 3.0 Neuronet Linux - Hardware 3 02-24-2003 09:19 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration