termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
34.81k stars 3.66k forks source link

Permission denied when trying to write or create file on USB Drive #1855

Closed stevenleeS0ht closed 3 years ago

stevenleeS0ht commented 3 years ago

Problem description

All of the shell command or executable file in Termux are not able to write data or create file at place on USB flash drive, through I have permitted Termux to access data at storage.

Steps to reproduce

My USB drive have file system exFAT, it can be discovered and read/writed by File Manager.

Expected behavior

It should be able to write or create file on any User accessible directory and filesystem.

Additional information

stevenleeS0ht commented 3 years ago

One possibly reason might because is exFAT filesystem doesn't support file owner and permission, Termux just regard files permission as root.

However, in desktop linux, the situation is a little bit different, if the filesystem doesn't support permission, it will be open to everyone.

stevenleeS0ht commented 3 years ago

@fornwall and @xeffyr please have a look.

Grimler91 commented 3 years ago

It is not possible without root currently, see duplicate issue https://github.com/termux/termux-app/issues/71.

Termux is only allowed to write to /sdcard and the folder Android/data/com.termux/files on the external sdcard, other places, including usb devices, are not possible to write to without root

Argo18 commented 3 years ago

Even the shellphish no file found linux choice not found what happen

kcubeterm commented 3 years ago

@Argo18 That's not our issue, please search on google to alternative. Linux choice either have deleted that repo or privatised.