Problem description
I appear to have lost permissions to files and directories in home, even though though I am their owner and permissions are set to 700.
For example, cd .termux will yield: bash: cd: .termux: Permission denied.
$ ls -lah
total 96K
drwx------ 10 u0_a132 u0_a132 4.0K May 12 10:27 .
drwx------ 4 u0_a132 u0_a132 4.0K Apr 20 13:08 ..
-rw------- 1 u0_a132 u0_a132 824 May 12 10:05 .bash_history
drwx------ 5 u0_a132 u0_a132 4.0K Apr 26 17:40 .config
drwx------ 3 u0_a132 u0_a132 4.0K Apr 24 18:53 .gnupg
drwx------ 3 u0_a132 u0_a132 4.0K Apr 20 13:01 .local
drwx------ 2 u0_a132 u0_a132 4.0K Apr 23 19:25 .shortcuts
drwx------ 3 u0_a132 u0_a132 4.0K Apr 21 14:25 .ssh
drwx------ 3 u0_a132 u0_a132 4.0K Apr 23 19:24 .termux
drwx------ 2 u0_a132 u0_a132 4.0K May 12 10:27 storage
drwxr-xr-x 14 u0_a132 u0_a132 4.0K Apr 28 16:29 wip
$ whoami
u0_a132
$ groups
u0_a132 inet everybody u0_a132_cache all_a132
$ chown u0_a132:u0_a132 .termux
chown: changing ownership of '.termux': Permission denied
Steps to reproduce
Unfortunately, I'm not sure. I opened up termux at some point and the theme had stopped working. When I tried to change the theme, I got a permission denied bubble, which prompted my investigation.
Expected behavior
Since I'm the directory's owner and permissions are set to 700, I expect to be able to set ownership and permissions, and to, e.g., cd into .termux.
Additional information
$ termux-info
Updatable packages:
All packages up to date
Subscribed repositories:
https://dl.bintray.com/grimler/science-packages-24 science/stable
https://dl.bintray.com/grimler/game-packages-24 games/stable
https://dl.bintray.com/termux/termux-packages-24 stable/main
System information:
Linux localhost 4.4.169-gee9976dde895 #1 SMP PREEMPT Wed Mar 6 01:42:27 UTC 2019 aarch64 Android
Termux-packages arch:
aarch64
Android version:
9
Device manufacturer:
Google
Device model:
Pixel 2
Since I'm the directory's owner and permissions are set to 700, I expect to be able to set ownership and permissions, and to, e.g., cd into .termux.
You can't set ownership without root.
And if you can't cd into Termux's directories, then you greatly messed with SELinux labels. Use /system/bin/restorecon -r to fix them (as root !).
Thanks -- I'm not rooted. Is there anything I can do to confirm that?
$ su
No su program found on this device. Termux
does not supply tools for rooting, see e.g.
http://www.androidcentral.com/root for
information about rooting Android.
I'm not rooted.
Then I can't figure out what happens.
Try to reinstall Termux.
i have problem i cant open my / directory
i already popup
$ cd /mnt/sdcard
$ ls
ls: cannot open directory '.': Permission denied
$ cd /mnt/sdcard
$ ls
ls: cannot open directory '.': Permission denied
Go to settings and allow permission for storage馃憤
dir home is wrong
$cd home (Permission denied)
but
$cd home/storage will not denied