There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

`chown` on a sdcard directory impossible...

Hi,

I would like to change the owner of a directory on the sdcard /sdcard/aDirectory

I have a terminal installed on my Android 10 (LineageOS 17) com.android.terminal

sudo is not present so I use su and it works.


<span style="color:#323232;">su
</span><span style="font-style:italic;color:#969896;">#Terminal was granted Superuser rights
</span><span style="color:#323232;">
</span><span style="color:#62a35c;">cd</span><span style="color:#323232;"> /sdcard
</span><span style="color:#323232;">chown 10:10 aDirectory
</span><span style="font-style:italic;color:#969896;">#I don't get any error message.
</span><span style="color:#323232;">
</span><span style="color:#323232;">stat aDirectory
</span><span style="font-style:italic;color:#969896;">#Uid (0/root)
</span>

So the owner stay root no matter what I’m doing, any ideas ?

chakli ,

If you want to change the owner of fat partition, you can do it while mounting, e.g. mount -t fat -o uid=10,gid=10 …

9point6 , (edited )

Unless the SD card is using a Linux filesystem, you won’t be able to use Linux access permissions.

Most SD cards are preformatted to FAT or exFAT in order to maximise compatibility. If you don’t need to use the card on any non-linux devices you should be able to reformat it and gain the ability to chown/chmod (should go without saying, but back up any data on the card you want to keep before this)

PetteriPano ,
@PetteriPano@lemmy.world avatar

What filesystem do you have on that SD-card? Likely FAT32, which does not support ownership.

user224 ,

But is it an SD card.

I mean, the directory name says so, but…


<span style="color:#323232;">~ $ realpath /sdcard
</span><span style="color:#323232;">/storage/emulated/0
</span><span style="color:#323232;">~ $
</span>

…it may also not be.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines