这是indexloc提供的服务,不要输入任何密码
Skip to content

Termux-exec allows execution of programs lacking permissions #5

@Neo-Oli

Description

@Neo-Oli

Termux-exec ignores missing permissions of a file. It allows files that don't have executive permissions to be executed anyway. This only happens when the file has a shebang that requires termux-exec. Normal termux-shebangs still give the correct 'permission denied'.

$ cat test.sh
#!/bin/sh
echo Hello World
$ ./test.sh
Hello World
$ chmod -x test.sh
$ ./test.sh
Hello World
$ ls -l test.sh
-rw------- 1 u0_a401 u0_a401 27 Sep 28 10:48 test.sh
$ termux-fix-shebang test.sh
$ ./test.sh
zsh: permission denied: ./test.s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions