When I try executing commands operating on files, they always fail. I can't check permissions on the terminal because I'd have to run a command that operates on a file (directory) in order to do so. Here is an example of what I mean:

Note that the terminal already shows a "Permission denied" error message when I open it.

According to my file browser, the /sdcard symlink (I suppose it's a symlink) has all permissions set. However, on the path to the linked locations, not all permissions are set. To test whether this is what's causing the problem, I created a new directory /t with all permissions set. You can see the result of me running ls in that directory in the terminal output above.

What do I have to do in order to be able to run commands that operate on files?

My phone is a rooted OnePlus 3 running OxygenOS 5.0.1 which is based on Android 8.0.0. BusyBox is installed.

  • Are you using custom ROM? Your /system directory seems to have bad permissions. If you have root, try su -c "ls -l $(which ls)" or use $(which busybox) ls – Irfan Latif Aug 14 '18 at 19:10
  • I can't try stuff myself anymore because my phone died. However, I think I should leave this question open in case someone has an idea that probably works and someone else comes across this. – UTF-8 Aug 14 '18 at 20:15

Your Answer

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

Browse other questions tagged or ask your own question.