Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xronin01 opened this issue Sep 18, 2024 · 3 comments
Open

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

xronin01 opened this issue Sep 18, 2024 · 3 comments

Comments

@xronin01
Copy link

Problem description

Screenshot_20240918-203954_Termux

Steps to reproduce the behavior.

.

What is the expected behavior?

No response

System information

  • Termux application version: 0.118.0+36d811e
  • Android OS version: 11
@xronin01
Copy link
Author

@agnostic-apollo
Copy link
Member

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
Copy link
Member

That is the expected behavior.
Termux expects to be operating on a file, not a symlink, for termux.properties.

/** Termux app properties primary file path */
public static final String TERMUX_PROPERTIES_PRIMARY_FILE_PATH = TERMUX_DATA_HOME_DIR_PATH + "/termux.properties"; // Default: "/data/data/com.termux/files/home/.termux/termux.properties"
/** Termux app properties primary file */
public static final File TERMUX_PROPERTIES_PRIMARY_FILE = new File(TERMUX_PROPERTIES_PRIMARY_FILE_PATH);
/** Termux app properties secondary file path */
public static final String TERMUX_PROPERTIES_SECONDARY_FILE_PATH = TERMUX_CONFIG_HOME_DIR_PATH + "/termux.properties"; // Default: "/data/data/com.termux/files/home/.config/termux/termux.properties"
/** Termux app properties secondary file */
public static final File TERMUX_PROPERTIES_SECONDARY_FILE = new File(TERMUX_PROPERTIES_SECONDARY_FILE_PATH);

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants