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

Discussion of Transmission that doesn't fit in the other categories
Post Reply
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

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

Post 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.
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

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

Post 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.
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

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

Post 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?
Post Reply