No permissions for Termux to access internal storage - even for reading Using the termux (https://termux.com) terminal-emulation program, I type the following command:

ls /sdcard


I get the following error:

ls: can't open '/sdcard': Permission denied


Realizing that the /sdcard directory on Android is a symlink, I tried to find the location of the actual directory -- learning that it is not just a symlink, but a symlink to another symlink, and the actual directory is /storage/emulated/0

So finally, I typed:

ls -ld /storage/emulated/0


The result I got was:

drwxrwx--x   63 root     sdcard_r      4096 Aug 10 12:04 /storage/emulated/0


So in short --- I don't know whether termux used to run with the permissions of the sdcard_r group or whether the o permissions used to allow read-write -- but I need to know which of the two it used to be and how to fix things - because being able to access the contents of the internal SD card is kinda critical.

No, my device is not rooted, nor do I plan to root it - so I can not give any information that I'd have to root the device to obtain. However, not being rooted never in the past prevented me from having read access to the /sdcard directory - so this is new (and disturbing).

Granted - it's been a few months since previously I tried to do this - but this new limitation from Android seriously hampers the usability of termux and who-knows-what-else -- as I need to be able to have access to files that are on my SD Card. (I can still do a lot, even if not everything, even without write permissions -- but am pretty much stuck in the water if I can't get read permissions, as is presently the case.)
Following the Termux wiki to run termux-setup-storage fixed it for me, as suggested by fornwall.

then restart Termux.