Page 1 of 1

Re: What user does the transmission for script-done running script after download

Posted: Tue Jan 30, 2018 9:36 am
by mike.dld
You could add a command such as `id -a` to your script (and redirect its output somewhere) to see what user and groups are effective. Script is running with same credentials as the Transmission itself, there is no special magic being done to change that.

Re: What user does the transmission for script-done running script after download

Posted: Tue Jan 30, 2018 4:15 pm
by mike.dld
I wasn't asking you to run the script from outside of Transmission :) What I'm talking about is adding a line to your script such as

Code: Select all

id -a > /tmp/id.log
And then adding a small torrent that will complete quickly, and check out what's written to that /tmp/id.log file which would be the information on user and groups that were used to run the script.

Another nice way to see if something's going wrong with your script (at least if you're using bash or similar, not sure about ash that you have in shebang) is to add something like

Code: Select all

exec > /tmp/script.log 2>&1
set -x # optional (for tracing)
At the very beginning of your script (after the shebang obviously) to get the output *of the whole script execution* (actually, all the commands that follow those above) that you're otherwise missing redirected to the log file.

Re: What user does the transmission for script-done running script after download

Posted: Wed Jan 31, 2018 9:07 am
by mike.dld
Is there a particular reason why you're using hard-coded "/mnt/sda1/Downloads/Complete" instead of $TR_TORRENT_DIR when constructing REMOTE_SOURCE value?