<---- template headericclude ----->
Non-root cannot automount USB or CD/DVD devices
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 13 of 13
  1. #1
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    Join Date
    Jun 2005
    Location
    Christchurch, New Zealand (originally for Switzerland)
    Age
    38
    Posts
    722
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    Join Date
    Jun 2005
    Location
    Christchurch, New Zealand (originally for Switzerland)
    Age
    38
    Posts
    722
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  6. #6
    Join Date
    Jun 2005
    Location
    Christchurch, New Zealand (originally for Switzerland)
    Age
    38
    Posts
    722
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  7. #7
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  8. #8
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  9. #9
    Join Date
    Dec 2006
    Location
    Tlaxcala, México
    Age
    39
    Posts
    3,175
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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 Nitro 5
    AMD Ryzen 5 2500U @ 2.0GHz, 32GB DDR4,
    480GB M.2, 480GB SSD.
    Fedora 39 x86-64.

  10. #10
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  11. #11
    Join Date
    Dec 2006
    Location
    Tlaxcala, México
    Age
    39
    Posts
    3,175
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mbratch
    Thanks Joe. Just checked my fstab and nothing unusual there.
    What about mtab?
    Notebook: Acer Nitro 5
    AMD Ryzen 5 2500U @ 2.0GHz, 32GB DDR4,
    480GB M.2, 480GB SSD.
    Fedora 39 x86-64.

  12. #12
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /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.

  13. #13
    Join Date
    May 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

Similar Threads

  1. usb devices no longer automount
    By th350urc3 in forum Using Fedora
    Replies: 2
    Last Post: 9th June 2007, 06:40 AM
  2. Replies: 0
    Last Post: 3rd April 2007, 05:18 AM
  3. Automount of USB Devices is not working
    By spamllama2000 in forum Hardware
    Replies: 3
    Last Post: 6th February 2007, 01:17 AM
  4. howto disable automount usb-devices...
    By tbl in forum Using Fedora
    Replies: 2
    Last Post: 4th April 2006, 07:17 PM
  5. devices don't automount
    By weinerdogus in forum Using Fedora
    Replies: 2
    Last Post: 1st April 2006, 01:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]