Find the answer to your Linux question:
Results 1 to 7 of 7
My MythTV backend sits in my office. I want to be able to come in every afternoon and plug in my iPods, have them automount, and then when I VNC ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    13

    Mount permissions - automounting ipods


    My MythTV backend sits in my office. I want to be able to come in every afternoon and plug in my iPods, have them automount, and then when I VNC into the server, have them show up on the desktop so I can manage them with (e.g.) gtkpod.

    So, user 'mythtv' is always logged into the box. User 'petey' is the interactive user who logs in when I VNC into the box.

    First, the iPods will automount just fine, to /media/NAME_OF_IPOD. The owner was user 'mythtv,' so it was a pain trying to manage them from petey's desktop session. I needed custom mount statements in /etc/fstab to get them to be owned by petey when they were mounted. Just to make things interesting, they kept showing up as different nodes under dev--the iPod shuffle at either /dev/sde or /dev/sdf, and the iPod Classic under /dev/sde1 or dev/sdf1. So for this I had to make custom udev rules so that the iPods were recognized.

    However I was successful at this. Here are my rules and mount statements:

    Code:
    /etc/udev/rules.d/10-local.rules:
    DRIVERS=="usb", ATTRS{manufacturer}=="Apple", ATTRS{product}=="iPod", ATTRS{serial}=="000A270011DB4522", SYMLINK+="ipodshuffle"
    DRIVERS=="usb", ATTRS{manufacturer}=="Apple Inc.", ATTRS{product}=="iPod", ATTRS{serial}=="000A270013313AFB", SYMLINK+="ipodclassic"
    
    /etc/fstab:
    /dev/ipodshuffle /media/ipodshuffle vfat rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=petey 0 0
    /dev/ipodclassic /media/ipodclassic vfat rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=petey 0 0
    When the iPods are mounted under these rules, then I can drag new tracks onto them from gtkpod and save them.

    However, actually getting them to automount now is another issue. If I do a 'sudo mount /dev/ipodshuffle' then all is well, but otherwise, they won't mount. I just get an error on the desktop that says "You are not privileged to mount the volume NAME_OF_IPOD."

    I've noticed similar privileges issues when, e.g., I go to eject a DVD. I have gotten messages along the lines that only user 'mythtv' can unmount the volume, or that there is no device in /sys/block, etc.

    I think this is part of a larger issue but I'm not sure how to diagnose/troubleshoot it. Any ideas on where I can start looking?

  2. #2
    Just Joined!
    Join Date
    Dec 2006
    Posts
    13
    No takers?

  3. #3
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Quote Originally Posted by cadfael View Post
    No takers?
    You might want to make sure that you are in the correct groups. Most likely the plugdev group.
    Check your group ID's with
    Code:
    id username
    Add users to groups with
    Code:
    useradd -G {group-name} username
    My output looks like this.
    Code:
    id tbob
    uid=1000(tbob) gid=1000(tbob) groups=6(disk),7(lp),10(wheel),18(audio),19(cdrom),27(video),80(cdrw),100(users),106(lpadmin),445(plugdev),35(games),1000(tbob)
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Dec 2006
    Posts
    13
    Quote Originally Posted by MikeTbob View Post
    You might want to make sure that you are in the correct groups. Most likely the plugdev group.
    No joy:

    [petey@titania ~]$ sudo useradd -G plugdev petey
    useradd: unknown group plugdev

  6. #5
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Do you have pmount installed? It lets users add/remove devices that are not in /etc/fstab? You can use groupadd to create the plugdev group. See the man page for usage. man groupadd
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  7. #6
    Just Joined!
    Join Date
    Dec 2006
    Posts
    13
    Quote Originally Posted by MikeTbob View Post
    Do you have pmount installed? It lets users add/remove devices that are not in /etc/fstab? You can use groupadd to create the plugdev group. See the man page for usage. man groupadd
    Yes, pmount is installed and I know how to add groups.

    It's not clear to me where you're going with this...as I pointed out above, although the iPods were not originally listed in /etc/fstab, I was able to simply add them after creating custom udev rules.

    The iPods are always correctly identified and mounted, the issue is, I have to sudo to do it (rather than them simply automatically mounting and popping up on the desktop per the configuration specified in /etc/fstab).

    Can you give me an idea of what you think the issue is and what you think the solution should do instead of just giving me a list of commands you think I should run? This is the newbie forum after all, I wouldn't turn down a little education even if it comes in the form of a cluebat

  8. #7
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Well, I was thinking that adding your user to the plugdev group would give you the permissions needed to automount these things with no trouble and without modifying the fstab file. I use Gentoo and if your user is not in the plugdev group then you can't access devices that are auto mounted, rather than using sudo.
    See here,
    plugdev - Google Search
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

Posting Permissions

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