chown
on a sdcard directory impossible...
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.
bash
su #Terminal was granted Superuser rights cd /sdcard chown 10:10 aDirectory #I don't get any error message. stat aDirectory #Uid (0/root)
So the owner stay root no matter what I'm doing, any ideas ?
What filesystem do you have on that SD-card? Likely FAT32, which does not support ownership.
But is it an SD card.
I mean, the directory name says so, but...
...it may also not be.
It doesn't matter. FAT filesystems - which are usually the default on SD cards, simply do not support ownership or file permissions. Linux emulates these attributes at mount time, but they apply to the entire SD card. You can mount an SD card and tell Linux to act as if root owns everything on the card; you that you own everything on the card; and it will be so until you unmount it and remount it with a different ownership.
These are filesystem level attributes, not device attributes. If you have a modern internal nvme drive and you format it with vfat, you will not be able to set permissions or ownership at the file level, but only at mount time, for the entire drive.