Results 1 to 7 of 7

Thread: Unable to Mount SD Card as Writeable

  1. #1
    Join Date
    Nov 2009
    Beans
    7

    Question Unable to Mount SD Card as Writeable

    I am running 9.04 on the SheevaPlug. I am attempting to mount a 4GB SD Card, but cannot seem to mount it with writable permissions. I can create edit files as root, but am unable to change the owner or permissions with chmod or chown, the commands do not seem to stick. I am using the following commands:

    Code:
    mount -t vfat -o rw /dev/mmcblk0p1 /mnt/sdcard
    I can then see that the card is mounted with
    Code:
    Filesystem           1K-blocks      Used Available Use% Mounted on
    ...
    ...
    ...
    /dev/mmcblk0p1         3860600         8   3860592   1% /mnt/sdcard
    Code:
    :~# cd /mnt/
    :/mnt# chmod 777 sdcard/
    :/mnt# ls -l
    total 4
    drwxr-xr-x 3 root root 4096 1969-12-31 19:00 sdcard
    The card is not in the physical 'lock' position, as as I can write to the card as root, that should verify this. But I can't write to the card as any other user.

    Also I am not sure why the date is off on the card, it is correct on my actual system.
    Code:
    :~# date
    Wed May 23 11:50:29 EDT 2012

  2. #2
    Join Date
    Dec 2011
    Location
    The Netherlands
    Beans
    1,093
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Unable to Mount SD Card as Writeable

    Try this code as your normal user (replace <user> and <group> with the values matching your normal user).
    Code:
    sudo umount /mnt/sdcard
    sudo chown <user>:<group> /mnt/sdcard
    sudo mount -t vfat -o rw /dev/mmcblk0p1 /mnt/sdcard
    Now try to write as your normal user to the card.
    "Everything that has a beginning, has an end." --an unexpectedly wise wallpaper

  3. #3
    Join Date
    Dec 2009
    Beans
    5,304

    Re: Unable to Mount SD Card as Writeable

    How about:
    mount -t vfat -o rw,uid=1000 /dev/mmcblk0p1 /mnt/sdcard
    OR

    mount -t vfat -o rw,umask=000 /dev/mmcblk0p1 /mnt/sdcard
    The first one makes you the owner instead of root. The second one keeps root as owner but allows everyone to read and write.

  4. #4
    Join Date
    Nov 2009
    Beans
    7

    Re: Unable to Mount SD Card as Writeable

    Thank you both for you speedy responses! I tried both methods, and they both work! It's so easy when someone tells you exactly what you need to do.

    Is there any benefit for using either of the methods, or do they really just do the same thing?

    Thanks again!

  5. #5
    Join Date
    Dec 2011
    Location
    The Netherlands
    Beans
    1,093
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Unable to Mount SD Card as Writeable

    Quote Originally Posted by Tman21901 View Post
    Thank you both for you speedy responses! I tried both methods, and they both work! It's so easy when someone tells you exactly what you need to do.

    Is there any benefit for using either of the methods, or do they really just do the same thing?

    Thanks again!
    Both methods do the same thing.
    Mine and Morbius' first suggestion both make the folder accesable for your user and when you mount it, your user will have access to the folder now.

    Or morbius' second suggestion allows everyone to read and write the files on the sd, though i'm not sure if it allows creating files as well.
    "Everything that has a beginning, has an end." --an unexpectedly wise wallpaper

  6. #6
    Join Date
    Dec 2009
    Beans
    5,304

    Re: Unable to Mount SD Card as Writeable

    Actually, the only reason I offered my suggestion was because I was sure roelforg's suggestion wouldn't work. A mount always overrides the permissions of the mount point.

    I treated this as just another vfat partition. When mounted manually as you did originally, without specifying ownership or permissions, it will mount with owner=root and perms=755. I could have set the mount point to 700 before the mount and made the owner=bob and it will mount with owner=root and perms=755.

    If you're saying roelforg's method worked I need to study up on what makes an SD Card different from a normal partition.

  7. #7
    Join Date
    Apr 2008
    Location
    Chennai, India
    Beans
    67
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Unable to Mount SD Card as Writeable

    I am running Ubuntu 12.04 LTS 64bit on my MacBook Pro 13" (late 2011). I ran into the same problem today, not being able to copy files from my harddisk to the microSD card.

    Here is what I think is the weird part - I am able to cp files from my harddisk to the card via the terminal. However, attempting to perform the same operation using Nautilus shows a nice "Error while copying to SDcard - The destination is read-only." pop up dialog with nothing but a Cancel button.

    I have not done a sudo cp, just cp as the user I am currently logged in as.
    Acer-AOD250 N280-1.66GHz 1GB-DDR2-533 160GB-HDD Ubuntu-10.04 x86
    Intel-D946GZIS E6300-1.86GHz 2x2GB-DDR2-667-DualChan 160GB-HDD LinuxMint-11 x86-64
    None of us were born knowing to use Windows. We just got used to it - unfortunately!

Tags for this Thread

Bookmarks

Posting Permissions

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