I have a Samsung Galaxy A5 (2016) which I rooted with Magisk.

Now in the process of installing TWRP and customizing my phone, I might have run some shell commands, like mount or sudo in a place where I shouldn't had.

So now some folders in my /sdcard/ are now "locked". Apps can't write to them like Whatsapp, Telegram, Camera, for example the messaging apps can't download any media, I can't take any picture with Camera.

When I try to delete a folder or a file with the built-in File Manager, it just doesn't succeed.

With adb shell I tried this command: rm -r /sdcard/Telegram/Telegram Images but I get permission denied, but running it as root works: su -c rm -r /sdcard/Telegram/Telegram Images.

What I did was, I checked ownership and read/write accesses with ls -al and I compared the results with a normal phone, EVERYTHING looks fine! User owner is root and group owner is sdcard_rw, folder permissions look like this drwxrwx--x and file permissions look like this: -rw-rw----.

This issue has been hunting me for a couple of months, my phone is almost unusable, sometimes app work, sometimes they don't. Please tell me how I can provide more information to help solve this problem, thanks very much.

  • 1
    sdcard Fix Permissions script
    – alecxs
    Commented Dec 28, 2020 at 18:14
  • 2
    In most cases restorecon -R /data/media should fix this. Details here: android.stackexchange.com/a/218409/218526 Commented Dec 28, 2020 at 18:52
  • 1
    btw 'rm -r /sdcard/Telegram/Telegram Images' actually will remove two files/directories namely "/sdcard/Telegram/Telegram" and also "./Images" (from your current pwd). you must quote paths containing whitespaces "/sdcard/Telegram/Telegram Images"
    – alecxs
    Commented Dec 28, 2020 at 21:10


You must log in to answer this question.