Sample Header Ad - 728x90

How to chown files and folders on the SD card, first attempts leaves to Permission denied

0 votes
0 answers
41 views
I have installed GraphHopper with Termux. I have ~/storage/shared pointing to my SD card: ~ $ ls -l storage/ total 0 lrwxrwxrwx. 1 u0_a212 u0_a212 34 Oct 30 12:45 dcim -> /storage/emulated/0/DCIM lrwxrwxrwx. 1 u0_a212 u0_a212 34 Oct 30 12:45 downloads -> /storage/emulated/0/Download lrwxrwxrwx. 1 u0_a212 u0_a212 34 Oct 30 12:45 movies -> /storage/emulated/0/Movies lrwxrwxrwx. 1 u0_a212 u0_a212 34 Oct 30 12:45 music -> /storage/emulated/0/Music lrwxrwxrwx. 1 u0_a212 u0_a212 34 Oct 30 12:45 pictures -> /storage/emulated/0/Pictures lrwxrwxrwx. 1 u0_a212 u0_a212 34 Oct 30 12:45 shared -> /storage/emulated/0 My user is u0_a212 and here are the links to the cache on the SD card: ~ $ ls -l graphhopper total 44767 -rw-------. 1 u0_a212 u0_a212 3448 Oct 30 12:34 config.yml drwxr-xr-x. 2 u0_a212 u0_a212 3452 Oct 30 09:45 custom_models lrwxrwxrwx. 1 u0_a212 u0_a212 82 Oct 29 18:11 europe -> /data/data/com.termux/files/home/storage/shared/Documents/graphhopper/europe lrwxrwxrwx. 1 u0_a212 u0_a212 98 Oct 29 18:11 graph-cache -> /data/data/com.termux/files/home/storage/shared/Documents/graphhopper/graph-cache -rw-------. 1 u0_a212 u0_a212 45780835 May 5 17:52 graphhopper-web-9.1.jar drwx------. 2 u0_a212 u0_a212 3452 Oct 30 09:40 logs The problem is here: ~ $ ls -dl /data/data/com.termux/files/home/storage/shared/Documents/graphhopper/graph-cache drwx------. 2 u0_a189 u0_a189 3452 Oct 30 12:47 /data/data/com.termux/files/home/storage/shared/Documents/graphhopper/graph-cache ~ $ ls -l /data/data/com.termux/files/home/storage/shared/Documents/graphhopper/graph-cache ls: cannot open directory '/data/data/com.termux/files/home/storage/shared/Documents/graphhopper/graph-cache': Permission denied Unexpectedly, from Android root, the user is not the same. And if I try to change it with chown, I get a Permission denied. Why the user is different? Is there a solution to change it?
Asked by lalebarde (101 rep)
Oct 30, 2024, 01:48 PM