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

Commands that function when manually entered and not when executed in script #5

Closed
anndrewww opened this issue Mar 31, 2017 · 1 comment

Comments

@anndrewww
Copy link

The following functions perfectly when manually entered into a Termux session:

rsync -avz -e ssh XX@XXX.XXX.XXX:/home/XXX/Pictures/Snapshots /data/data/com.termux/files/home/downloads/Snapshots

The same command has been copied into an executable (chmod +x) script, but when I attempt to execute via the command line (./SyncSnapshots) or via the Tasker plugin, the following is returned:

via command line: bash: ./SyncSnapshots: Permission Denied

via Tasker plugin: exec("data/data.com.termux/files/home/.termux/tasker/SyncSnapshots"): Permission Denied

@fornwall
Copy link
Member

Sorry for the late reply here! I suspect that your SyncSnapshots file has a shebang like #!/bin/sh or similar which does not work under Termux, as Android does not have a /bin or /usr folder.

If it's a simple shell script, just remove the shebang. Otherwise run termux-fix-shebang SyncSnapshots to rewrite the shebang path before executing.

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

No branches or pull requests

2 participants