Results 1 to 4 of 4

Thread: Ubuntu: Udev calling script that cannot mount

  1. #1
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Ubuntu: Udev calling script that cannot mount

    I have a udev rule that runs a script when a certain USB stick is plugged in. The script is running (I echo "woop" >> /tmp/usblog as part of the script and it appears as expected) but the mount command within the script is not getting run.

    If I run the script as root it mounts the drive without any problems. However when run from udev, it does not (I did some reading and was under the impression that udev ran commands as root). I haven't seen any trace of failure in /var/log/messages and /var/log/syslog (are there any other places I could look?) so does anyone have any idea why it wont work?

    Thanks
    Chris

  2. #2
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: Ubuntu: Udev calling script that cannot mount

    It's a permission problem, this is why hal is normally used for automounting. Normally only root can mount volumes with the mount command, with the exception of the volume having the 'user' option in /etc/fstab.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  3. Received thanks from:

    Raz316 (07-07-2009)

  4. #3
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Re: Ubuntu: Udev calling script that cannot mount

    Thanks aid

    I do have the following for the drive in fstab

    /dev/sdf /media/backup auto rw,user,sync 0 0

    which I assumed meant a user could mount aswell?

  5. #4
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: Ubuntu: Udev calling script that cannot mount

    Quote Originally Posted by Raz316 View Post
    which I assumed meant a user could mount aswell?
    Yes. Although I don't remember whether the process needs to be in the user group. Checkout `man fstab'.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ubuntu - utter junk? (A rant)
    By stroberaver in forum Software
    Replies: 18
    Last Post: 26-02-2008, 02:14 PM
  2. Run script on USB Mount
    By Raz316 in forum Software
    Replies: 3
    Last Post: 04-05-2007, 07:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •