Fedora Linux Support Community & Resources Center
  #1  
Old 24th December 2007, 03:06 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
Unhappy Non-root cannot automount USB or CD/DVD devices

I have Fedora 8 and seems I cannot mount USB devices or CDs/DVDs as a normal user.

When I insert a device (flash drive or a CD), it shows up in the /proc/partitions table, but gives me an error dialog:
Cannot mount volume.
Unable to mount the volume.
Cannot obtain lock on /media/.hal-mtab
I have some fixed hard drive partitions (VFAT) that automount fine as user. I've tried to mimic options I have in those automount maps for these removable media, but it just won't work.

Seems like my CD stuff used to mount OK. At least I've had it working before, but it all seems accidental. :-/

I've done a lot of googling and come up with nothing.

Any help appreciated...
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #2  
Old 24th December 2007, 04:58 PM
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 29
Posts: 710
Hallo

as normal user you should never ever be able to mount or unmount anything. This is Unix security. It is normal only members of the usergroup "disk" can do it. It is a bad idea to add normal users to "disk".

The easier way is to use the functions in Gnome or KDE. They are using dbus.
I'm a KDE user. In KDE you can mount any device as normal user in the media:// folder. Use the konqueror to brows it.
I'm not sure how it woks in Gnome. But it will be the same.

Your VFAT derives are mounted by /etc/fstab on system startup. It is not common to handle removable medias in /etc/fstab todays.

Merry x-mass
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #3  
Old 24th December 2007, 06:39 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
Quote:
Originally Posted by tho.mei
as normal user you should never ever be able to mount or unmount anything. This is Unix security. It is normal only members of the usergroup "disk" can do it. It is a bad idea to add normal users to "disk".

The easier way is to use the functions in Gnome or KDE. They are using dbus.
I'm a KDE user. In KDE you can mount any device as normal user in the media:// folder. Use the konqueror to brows it.
I'm not sure how it woks in Gnome. But it will be the same.

Your VFAT derives are mounted by /etc/fstab on system startup. It is not common to handle removable medias in /etc/fstab todays.
My system is setup to use automount and dbus, but when I plug in a flash drive or CD-ROM or DVD, it attempts to automount but gives me the error and the mount does not occur.

My VFAT drives are not set up in /etc/fstab. I have them set up in automount and they work fine.
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #4  
Old 24th December 2007, 06:47 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
OK, this is sort of interesting...

I was just logged in as a normal user, and I ran GParted. As it was scanning, it gave me that same error about automounting my VFAT drives, even though I gave GParted my root password.

Ironically, at a command prompt as normal user, I can cause an automount of the VFAT partitions fine by changing directory to those locations.

I've googled far and wide about this stuff and came up with nothing. Doesn't anyone in the world really understand how this works?
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #5  
Old 24th December 2007, 06:57 PM
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 29
Posts: 710
Hallo

the VFAT drives are may be mounted with the option "user". It is set to allow user to mount and unmount. See in /etc/fstab

The automount daemon is normally not used anymore. It was never working very nice. I don't know how Gnome does it. But KDE looks a new connected or inserted disk up on the desktop. You need only to dabble click it and it will mounted.

As I told you, you should be unable to mount a device in the command line as normal user.
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #6  
Old 24th December 2007, 07:02 PM
tho.mei Offline
Registered User
 
Join Date: Jun 2005
Location: St. Gallen Switzerland or Christchurch, New Zealand
Age: 29
Posts: 710
Hallo again

gparted is a partitioning tool. If you would be able to change partitions as a normal user, it would be a big security leak. To change partitions you must be root! No other way. Linux is not like Window$!
__________________
tho.mei
I use KDE!
Many workstions and few servers running on Fedora or Scientific Linux professionally.
Using LINUX to do some scientific 3D-stuff.
I'm RHCT
Reply With Quote
  #7  
Old 24th December 2007, 07:05 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
Quote:
Originally Posted by tho.mei
As I told you, you should be unable to mount a device in the command line as normal user.
And as I have said, it works fine with automount. Or if I set "user" in the options in /etc/fstab.

This is diverging from my original stated problem.
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #8  
Old 24th December 2007, 07:06 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
Quote:
Originally Posted by tho.mei
gparted is a partitioning tool. If you would be able to change partitions as a normal user, it would be a big security leak. To change partitions you must be root! No other way. Linux is not like Window$!
Again, you are not understanding the problem.

GParted logs in as root, asks me for root password which I give it. My only point was that even though I did this, it gives me the same mount errors for my VFAT partitions. These same partitions I can automount at the command line as a normal user. This behavior does not make any sense.

Again, this diverges from the problem I have stated.
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #9  
Old 24th December 2007, 07:09 PM
joe.pelayo Offline
An ape descendant
 
Join Date: Dec 2006
Location: Mexico City
Age: 30
Posts: 3,105
I experienced a similar problem some days ago. Out of the sudden my F7 x86 refused to automount even USB flash drives, root could mount them of course. Besides at startup I used to get an error message while "mounting local file systems".

Tinkering little with the system I found out that an extra line had made its way to /etc/fstab somehow: it was an entry giving the address of one of my removable drives (NTFS type) using the sdc1 device. That was the reason of the startup error message, and I assume it was the reason of the automount problem because the device /dev/sdc1 was reserved somehow.

Removing the offending line solved both problems. Of course this was specific to my system and I am not suggesting you to go and just remove lines in fstab.

Thanks.
Joe.
__________________
Notebook: Acer Aspire 5536-5112.
AMD Athlon X2 QL64 @ 2.1GHz, 4GB DDR2 PC2-5300, ATI Radeon HD3200 (256MB), 250GB Toshiba HDD, HL-DT-ST DVDRAM GT20N
Windows 7 Professional, Fedora 20 x86_64
Reply With Quote
  #10  
Old 24th December 2007, 07:16 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
Thanks Joe. Just checked my fstab and nothing unusual there.
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #11  
Old 24th December 2007, 07:31 PM
joe.pelayo Offline
An ape descendant
 
Join Date: Dec 2006
Location: Mexico City
Age: 30
Posts: 3,105
Quote:
Originally Posted by mbratch
Thanks Joe. Just checked my fstab and nothing unusual there.
What about mtab?
__________________
Notebook: Acer Aspire 5536-5112.
AMD Athlon X2 QL64 @ 2.1GHz, 4GB DDR2 PC2-5300, ATI Radeon HD3200 (256MB), 250GB Toshiba HDD, HL-DT-ST DVDRAM GT20N
Windows 7 Professional, Fedora 20 x86_64
Reply With Quote
  #12  
Old 24th December 2007, 07:40 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
/etc/mtab looks normal: shows what's currently mounted. It's not intended to be edited by a user: it's managed by linux.
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
  #13  
Old 24th December 2007, 08:38 PM
mbratch Offline
Registered User
 
Join Date: May 2006
Posts: 268
OK problem solved. Just avoid using automount altogether. Everything I was reading on the i'net was saying /etc/fstab was old-school and automount was the way to go. I fixed everything by making entries in /etc/fstab and not using automount.
__________________
Mark Bratcher
http://www.codekinesis.com

Those who don't learn from history are doomed to accept the rewriting of it.
Reply With Quote
Reply

Tags
automount, cd or dvd, devices, nonroot, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
usb devices no longer automount th350urc3 Using Fedora 2 9th June 2007 07:40 AM
usb disks automount as root.root 755 - user cannot write!:( mrmailer Using Fedora 0 3rd April 2007 06:18 AM
Automount of USB Devices is not working spamllama2000 Hardware & Laptops 3 6th February 2007 01:17 AM
howto disable automount usb-devices... tbl Using Fedora 2 4th April 2006 08:17 PM
devices don't automount weinerdogus Using Fedora 2 1st April 2006 01:38 AM


Current GMT-time: 10:39 (Thursday, 27-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Prince's Palace of Monaco - Tozeur Travel Photos - Jetblue MCO Gate 4 Travel Photos on Instagram