Unable to handle subfolders in Termux I'm trying to run a program which has its own directory. Termux doesn't allow creating the directory nor accessing the folder (permission denied error) after moving it to the Termux home directory with a root file explorer app. Also with p7zip (command line port of 7-Zip) I can't create a new directory with 7z x -o &lt;folder name&gt; &lt;archive name&gt;, I can only extract to the Termux home folder.

Termux FAQ has a page for the error, but the chmod command results in operation not permitted. I wonder if this issue is related to the differences in Linux distributions and Android:


  Why do I keep getting 'No such file or directory' when trying to
  execute binary (it's file exists) ?
  
  This happens when you are executing binary compiled for Linux
  distribution, e.g. Ubuntu or Arch Linux. This is caused by ABI
  difference between GNU libc and Bionic libc.
  
  Create a proper chroot (proot) environment and try to execute binary
  from it.
It's likely that the permission or owner has messed up.

Go find a folder where Termux operates normally, and run ls -ln to get the UID and GID of Termux (they should be the same, on the 3rd and 4th column of ls -ln). Then switch to root with su or tsu and change the owner of the problematic directory to Termux like this:

chown -R 10001.10001 path/to/dir


where 10001 should be replaced with the UID of Termux. Then you should be good to go.