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 <folder name> <archive name>, 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.

  • Which directory you are trying to create with Termux and to which directory you are trying to extract the archive? May I know the exact location? Did you try that with root or without root? And yes, Termux environment is different than that of standard Linux distros. If the p7zip binary is of different architecture or a dynamic binary compiled for Linux linker and Linux libc, that won't work with Android linker and Android libc. Dec 21, 2018 at 19:11
  • ASF-linux-arm, ArchiSteamFarm V3.4.1.7 specifically. Unzip (ships with Termux) can't open the archive at all. I tried creating a subfolder inside the Termux home directory, 7z x -o <folder name> <archive name> command in p7zip.
    – user598527
    Dec 22, 2018 at 8:30
  • @IrfanLatif: My phone is rooted but I haven't issues Termux root rights, I don't yet know how this works.
    – user598527
    Dec 22, 2018 at 8:31
  • Any status updates?
    – iBug
    Jan 19, 2019 at 4:43
  • @iBug: Sorry for the delay, I'll return to the topic after I've reinstalled LineageOS. I get some unknown reboots after installing a major version on top of the previous one.
    – user598527
    Jan 22, 2019 at 15:23

1 Answer 1


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.

  • Sorry, I don't necessarily have time to test this before the holidays are over. Your answer looks promising.
    – user598527
    Dec 22, 2018 at 8:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .