Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-02-24 02:50:45

arno
Member
Registered: 2022-02-24
Posts: 1

Accidentally opened Micro sd card as Root, can't write to it anymore.

I was just modding my 3DS that I have not touched in awhile, and got curious about what "open as root" did, and regretted the choice since.
Tried using gparted to fix the sdcard and got no sauce.
How do I fix this or is it just stuck on read only forever now?

I need the sd card to be a readable and writeable fat32. sad

Offline

#2 2022-02-24 04:18:14

ruuwa
Member
Registered: 2022-02-09
Posts: 22

Re: Accidentally opened Micro sd card as Root, can't write to it anymore.

Have you tried unmount/remove it, then mounting it and specify the owner and group? 
Like this ones: https://unix.stackexchange.com/question … -partition and https://superuser.com/questions/79813/r … -in-ubuntu

Restarting is probably the first thing you should try though.

Last edited by ruuwa (2022-02-24 04:20:05)

Offline

#3 2022-02-25 12:57:46

MintJulep
Member
Registered: 2022-02-25
Posts: 6

Re: Accidentally opened Micro sd card as Root, can't write to it anymore.

Change owner with

sudo chown -R username:username /mount/point
in the terminal
username = your username
/mount/point = path to your sd-card (for example /run/media/username/your_sd-card

or use gnome-disk-utility, it can change the owner of a drive too.

Offline

#4 2022-02-26 05:54:13

ruuwa
Member
Registered: 2022-02-09
Posts: 22

Re: Accidentally opened Micro sd card as Root, can't write to it anymore.

It seems for fat filesystems, ownership and permissions are just pretend. But who knows, that kind of chown may help.

Although you can check the "Properties" by right-clicking the files in the SD card in thunar to check the current ownership/permissions.

I assume the problem is the SD card always gets mounted with wrong uid and gid now. And that's why I suggested manually specifying uid and gid or restart to fix the behavior.

Offline

#5 2022-02-26 09:04:32

MintJulep
Member
Registered: 2022-02-25
Posts: 6

Re: Accidentally opened Micro sd card as Root, can't write to it anymore.

ruuwa wrote:

It seems for fat filesystems, ownership and permissions are just pretend.

That's right, but the mount point is a directory within the Linux filesystem and has permissions.
I had the same problem with an USB drive a while ago.
"Easy" way is gnome-disk-utility
With the "Take ownership..." option you can swap ownership to current user (have your sudo password at hand). It's greyed out here 'cause current user owns the drive already.
43100329yd.png

Last edited by MintJulep (2022-02-26 09:55:57)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 545.48 KiB (Peak: 550.13 KiB) ]