chmod: Everything on SD Card Stuck On 755, Owner is Root

14,582

How is your SD card mounted?

mount | grep /media/ubuntu

Do you see ro or rw? You can remount it read/write by:

sudo mount -o remount,rw /media/ubuntu  

If you read man 8 mount you can add an entry into /etc/fstab (man 5 fstab) that will allow a specified user, or all users to mount (and own) the SD card.

Share:
14,582

Related videos on Youtube

Justadoo444
Author by

Justadoo444

Updated on September 18, 2022

Comments

  • Justadoo444
    Justadoo444 over 1 year

    I am trying to access my SD card as a general user after it somehow changed to just Root access. I have tried several solutions, and none of them worked. Here is an attempt to chown eveything to ubuntu (Using a live USB here):

    $ sudo chown ubuntu -R  /media/ubuntu
    chown: changing ownership of ‘/media/ubuntu/JUSTADOO444/(Every single file/folder)’: Operation not permitted
    chown: changing ownership of ‘/media/ubuntu/JUSTADOO444’: Operation not permitted
    

    And after an attempt to chmod everything to 777:

    Command:

    $ sudo chmod 777 /media/ubuntu/ -v -R
    mode of ‘/media/ubuntu/JUSTADOO444/(Everything)’ changed from 0755 (rwxr-xr-x) to 0777 (rwxrwxrwx)
    

    And after a quick ls -l:

    drwxr-xr-x  5 root root     4096 Sep  8 18:54 Sample Folder (Name Changed)
    -rwxr-xr-x  1 root root  4402055 Sep 16 11:53 Sample Presentation.odp
    

    This is getting on my nerves. I have to use sudo before every single thing I try to do to my SD card. (It has a LOT of data on it, too, and I am unlucky enough to not have a space to backup. If only my 16gb flash drive wasn't being used for Ubuntu booting only...)

    • muru
      muru over 8 years
    • muru
      muru over 8 years
      (assuming your SD card is formatted exFAT or something)
    • Justadoo444
      Justadoo444 over 8 years
      Mine, in Disks, is: W95 FAT32 (LBA). I'll try the linked question anyways.
    • Justadoo444
      Justadoo444 over 8 years
      The linked question/answer failed me. Everything's still as root.
    • Byte Commander
      Byte Commander over 8 years
      Add the output of mount | grep /media/ubuntu to your question, please.