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.85k stars 3.67k forks source link

[Bug]: termux.properties doesn't work when it's a symlink #4157

Open xronin01 opened 17 hours ago

xronin01 commented 17 hours ago

Problem description

Screenshot_20240918-203954_Termux

Steps to reproduce the behavior.

.

What is the expected behavior?

No response

System information

xronin01 commented 17 hours ago

https://github.com/termux/termux-app/actions/runs/10929630705

agnostic-apollo commented 17 hours ago

That's not allowed due to security reasons as symlinks could be created to public directories. Restriction might be eased in future if possible.

TomJo2000 commented 17 hours ago

That is the expected behavior. Termux expects to be operating on a file, not a symlink, for termux.properties. https://github.com/termux/termux-app/blob/36d811ea7d6b0e76a6860e58cd08b0a24bf9f69a/termux-shared/src/main/java/com/termux/shared/termux/TermuxConstants.java#L720-L728

As you can see in the snippet above, if you don't want to use the location in ~/.termux/termux.properties you can alternatively use ~/.config/termux/termux.properties