Chmod: Everything on Sd Card Stuck on 755, Owner Is Root

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

5

3 Answers

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.

Have you tried adding uid=your_username to the mount options. It worked for me and changes the Owner to me everytime I plug it in

For me this was because I had an SD card formatted as a FAT32 filesystem. Fat32 doesn't support file permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest