Announcement

Collapse
No announcement yet.

unable to write to usb mp3 player - how to change permissions for a device

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    unable to write to usb mp3 player - how to change permissions for a device

    Hello Ubuntu users,

    Firstly, I must say that I was very excited to find an Ubuntu newsgroup.
    There seems to be a lot of forums but not many newsgroups for Ubuntu and
    its variations (Kubuntu, Xubuntu, etc.).

    I am hoping to get some assistance in fixing the problems I have been
    having with my mp3 player - Rio Cali. So far I have gotten my system to
    recognize my Rio as a usb device and have been able to mount it without
    any problems. I can read from it but I cannot write to it.

    A basic web search led me to believe that I don't have the right
    permissions for my drive. But unfortunately, I am very new to Linux
    (and Ubuntu) and cant make any sense out of the instructions on some of
    the websites.

    I would like to be able to write to my Rio as a user (without requiring
    to be the root user every time). I would greatly appreciate a response
    which contains step-by-step instructions on the fix.

    My operating system is Ubuntu 6.06 (Dapper Drake) and I am using KDE as
    my desktop.

    Thanks in advance.
    Funkid

    PS: My eventual goal is to be able to connect to my Rio using amaroK
    and sync up my songs just like I used to do with my Rio and windows
    media player (WMP). At the moment I am unable to and I suspect it is
    because I do no have the right permissions (as a user) to access the Rio
    from amaroK.

    #2
    Re: unable to write to usb mp3 player - how to change permissions for a device

    Allright,

    you have the same Problem, I guess, that most users have. Only Root is allowed to mount a Device. So If your System mounts a pluged in Device automaticaly (you didn't mount it yourself), you'll always have the right to read but not to write. Same thing, if you mount manualy.

    Here is a solution, but this has two considerable disadvantages. Thats why these came first:
    1. You'll always have remember the Device Name. If you plug in another USB Device, like an external HDD, You'll get the same result, Read and Write.
    2. Every User has these rights, not only you. Is just your System. OK. If not theres a possibility to increase Security a little.

    But now, the solution:

    1. Create a Directory, either in the "/"-Directory or in another one called something like "/usbstick". But / is the best way to avoid further complications.
    2. In wich fs is your mp3-player formatted? You don't know? Plug it in, mount it, type "fdisk -l | grep sda" (if that doesn't work, try without "| grep sda", and search the output. You mounted it, so you know the Devicename). Remember the Device-name too. You'll need it later.

    For now, I asume it's FAT32/VFat

    3. Edit your fstab-file(/etc/fstab). Just add the following lines:

    # allows user to mount <---- This is a Comment
    /dev/sda1 /usbstick vfat user,umask=0,noauto 0 0 <---- External Drives are usually
    mounted as SCSI. sda1 must
    be replaced by the right
    Device name. /usbstick is the
    path to your created Dir in /.

    From now on you'll have to remember, whenever using an USB-Device, that it might be recognized as sda1. So watch out. Make sure, when you proceed like this, that you'll mount no other external device. And when you want to wright files to your RIO CALI, make sure there is no other Device mounted as sda1 (or whatever Device-Name it has).

    I hope these steps are comprehensible. If not, just post a reply.

    Amun-Ra

    Comment


      #3
      Re: unable to write to usb mp3 player - how to change permissions for a device

      Originally posted by Amun-Ra
      From now on you'll have to remember, whenever using an USB-Device, that it might be recognized as sda1. So watch out. Make sure, when you proceed like this, that you'll mount no other external device. And when you want to wright files to your RIO CALI, make sure there is no other Device mounted as sda1 (or whatever Device-Name it has).
      One way to overcome this problem (unless you have 2 identical thumb-drives for example) is to mount the device "by-id".
      Before attaching your USB device do this:
      ls /dev/disk/by-id
      You should see something like this:
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334 ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part6
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part1
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part2
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part5
      Make note of the disks already seen by your system. In the example above there is one HD (with 4 partitions).
      Then attach your USB device run:
      ls /dev/disk/by-id
      You'll get something like this:
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334 ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part6
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part1 usb-Myson_Century,_Inc._USB_Mass_Storage_Device_100
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part2 usb-Myson_Century,_Inc._USB_Mass_Storage_Device_100-part1
      ata-WDC_WD400BB-00DEA0_WD-WMAD12381334-part5
      In the example there is a USB mass storage device with 1 partition.

      Now you know the "id" of the device you can edit fstab substituting /dev/sda1 with /dev/disk/by-id/usb-Myson_Century,_Inc._USB_Mass_Storage_Device_100-part1 in Amun-Ra's example, so it should look like this:
      /dev/disk/by-id/usb-Myson_Century,_Inc._USB_Mass_Storage_Device_100-part1 /usbstick vfat user,umask=0,noauto 0 0
      Using this method you should not have a problem with the device being seen as sda1 or sda2 etc.

      Comment


        #4
        Re: unable to write to usb mp3 player - how to change permissions for a device

        I hope you don't mind if I jump in on this thread. I have a Rio Forge and I can't even get Kubuntu to "see" it when I connect via usb. The OS "sees" my external usb HD and mounts it by default. It also "sees" my Flash memory stick and flash memory card reader as soon as I connect the drive or stick a card into the reader, but it will not "see" my Rio Forge for some reason.

        I read the reply about how to update /etc/fstab and I've done so many times in FreeBSD, but I would like to be able to mount my Rio manually before I change my fstab file. So far, this is what I've done after reading the thread and the advice therein:

        # dir /dev/disk/by-id

        ata-_I_E_O___T_-_6_0_B_________________________________________
        ata-Maxtor_32049H2_B_L243NJTC
        ata-Maxtor_32049H2_B_L243NJTC-part1
        ata-Maxtor_32049H2_B_L243NJTC-part2
        ata-Maxtor_32049H2_B_L243NJTC-part5
        usb-Rio_Forge_0002F5A7C1A5CA1F
        usb-USB2.0_CardReader_CF_RW_730415536500
        usb-USB2.0_CardReader_Combo_730415536500
        usb-WDC_WD80_0BB-55HEA0_10000001045E
        usb-WDC_WD80_0BB-55HEA0_10000001045E-part1

        Okay, something is able to "see" the usb-Rio_Forge... but fdisk does not:

        # fdisk -l

        Disk /dev/hda: 20.4 GB, 20491075584 bytes
        255 heads, 63 sectors/track, 2491 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot Start End Blocks Id System
        /dev/hda1 * 1 2385 19157481 83 Linux
        /dev/hda2 2386 2491 851445 5 Extended
        /dev/hda5 2386 2491 851413+ 82 Linux swap / Solaris

        Disk /dev/sda: 80.0 GB, 80026362368 bytes
        255 heads, 63 sectors/track, 9729 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot Start End Blocks Id System
        /dev/sda1 1 9728 78140128+ 7 HPFS/NTFS

        So, assuming a vfat file system, I created a mount point (as root) named /mnt/ipod since that's what Amarok requires for a compatible mp3 player and then I tried to mount it:

        # mount -t vfat /dev/disk/by-id/usb-Rio_Forge_0002F5A7C1A5CA1F /mnt/ipod
        mount: No medium found

        At this point, I'm very open to suggestions.

        KDE Dragon

        Comment


          #5
          Re: unable to write to usb mp3 player - how to change permissions for a device

          KDE Dragon,

          have you ever tried to (re-) format this "Rio" disk? For what you post here, makes me think that there is no valid file system table on this disk - otherwise you would get something along the lines of "-part1", "-part2" etc. pp.

          I this were my disk, I would launch GParted to have a closer look at it ;-)

          HTH
          Birdy

          Comment


            #6
            Re: unable to write to usb mp3 player - how to change permissions for a device

            I this were my disk, I would launch GParted to have a closer look at it ;-)

            HTH
            Birdy

            Thanks for the Reply Birdy. I did as you suggested by downloading and running GParted, but no joy! Kubuntu just does not "see" my Rio Forge and I don't know why. GParted only identified my boot drive and my (USB) external data drive. Any other ideas?

            KDE Dragon

            Comment


              #7
              Re: unable to write to usb mp3 player - how to change permissions for a device

              If Kubuntu (actually the udev system, which is part of Linux) is, in fact SEEING the device in /dev/disk/by-id/, but is not seeing any partitions, I would draw the conclusion that the RIO Forge is not using a standard file system like vfat.

              Does this device work under either Mac OS-X or FreeBSD, (or even, windoze)? If so, you should be able to see the partition table in that operating system (maybe not in windoze). There is a standard list of partition type IDs, that you can look up. I remember seeing it on a Red Hat site several years ago, but you can certainly Google it. If you can identify the file system, we can probably work with it.

              Yet another possibility, is to see what you can find out from RIO tech support.

              Comment

              Working...
              X