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

chmodchownpermissionssd card

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…)

Best Answer

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.

Related Question