Page 1 of 1

Transmission - permission denied

Posted: 29 Mar 2020, 17:34
by ehjyen
Hi

I am having difficulty getting transmission-postprocess.sh working properly with FileBot:
  1. I always receive the following error in amc.log:
    Permission denied
    java.io.IOException: Permission denied
    at java_io_File$createNewFile$4.call(Unknown Source)
    at Script1.run(Script1.groovy:149)
    at net.filebot.cli.ScriptShell.evaluate(Unknown Source)
    at net.filebot.cli.ScriptShell.runScript(Unknown Source)
    at net.filebot.cli.ArgumentProcessor.runScript(Unknown Source)
    at net.filebot.cli.ArgumentProcessor.run(Unknown Source)
    at net.filebot.Main.main(Unknown Source)
  2. I have set --def reportError=y in transmission-postprocess.sh, along with the Gmail details. Should I expect an email notifying of a failed attempt like the above? I never have never received one from transmission-postprocess.sh (but I do when running FileBot otherwise using the same Gmail details).
Where have I gone wrong? Example log & details below. Thanks for any help!


transmission-postprocess.sh

Code: Select all

#!/bin/sh -xu

# Input Parameters
ARG_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
ARG_NAME="$TR_TORRENT_NAME"
ARG_LABEL="N/A"

# Configuration
CONFIG_OUTPUT="/volume2/Media"

/usr/local/bin/filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate -non-strict --order Airdate --conflict auto --lang en --def 'music=y' 'unsorted=y' 'subtitles=eng' 'skipExtract=y' 'plex=192.168.1.20:********************' 'seriesFormat={plex}' 'animeFormat={plex}' 'movieFormat={plex}' 'musicFormat={plex}' 'unsortedFormat={plex}' 'excludeList=.excludes' 'gmail=*********:****************' 'mailto=********@********' 'reportError=y' ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" --apply refresh --log all --log-file /volume1/downloads/amc.log

amc.log

Code: Select all

Run script [fn:amc] at [Sat Mar 28 09:25:26 AWST 2020]
Parameter: music = y
Parameter: unsorted = y
Parameter: subtitles = eng
Parameter: skipExtract = y
Parameter: plex = *****
Parameter: seriesFormat = {plex}
Parameter: animeFormat = {plex}
Parameter: movieFormat = {plex}
Parameter: musicFormat = {plex}
Parameter: unsortedFormat = {plex}
Parameter: excludeList = .excludes
Parameter: gmail = *****
Parameter: mailto = *****
Parameter: reportError = y
Parameter: ut_dir = /volume1/downloads/**********.H264-XLF[rarbg]
Parameter: ut_kind = multi
Parameter: ut_title = **********.H264-XLF[rarbg]
Parameter: ut_label = N/A
Use excludes: /volume2/Media/.excludes
Permission denied
java.io.IOException: Permission denied
	at java_io_File$createNewFile$4.call(Unknown Source)
	at Script1.run(Script1.groovy:149)
	at net.filebot.cli.ScriptShell.evaluate(Unknown Source)
	at net.filebot.cli.ScriptShell.runScript(Unknown Source)
	at net.filebot.cli.ArgumentProcessor.runScript(Unknown Source)
	at net.filebot.cli.ArgumentProcessor.run(Unknown Source)
	at net.filebot.Main.main(Unknown Source)

Error (o_O)

sysinfo

Code: Select all

filebot -script 'fn:sysinfo' --log-file '/usr/local/filebot-node/data/filebot.log'
------------------------------------------

FileBot 4.9.0 (r7234)
JNA Native: 6.1.0
MediaInfo: 19.09
7-Zip-JBinding: 9.20
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2020-03-16 (r625)
Groovy: 3.0.2
JRE: OpenJDK Runtime Environment 13.0.2
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 991 MB Max Memory / 50 MB Used Memory
OS: Linux (amd64)
HW: Linux NAS 4.4.59+ #24922 SMP PREEMPT Mon Aug 19 12:13:37 CST 2019 x86_64 GNU/Linux synology_apollolake_918+
STORAGE: ext4 [/] @ 1.2 GB | btrfs [/volume1] @ 267 GB | btrfs [/volume2] @ 4.8 TB
DATA: /volume1/@appstore/filebot/data/admin
Package: SPK
License: FileBot License P9407236 (Valid-Until: 2020-09-24)
Done ヾ(@⌒ー⌒@)ノ

------------------------------------------

Re: Transmission - permission denied

Posted: 29 Mar 2020, 18:27
by rednoah
1.
Looks like a permissions issue. Kinda one of these things that you have to figure out yourself:

Looking at the log, I guess /volume2/Media/.excludes can't be created:

Code: Select all

Use excludes: /volume2/Media/.excludes
Permission denied
java.io.IOException: Permission denied
	at java_io_File$createNewFile$4.call(Unknown Source)
:idea: The easiest way to solve permission issues on Synology, and in general, is to just give up and start anew. I'd create a new pristine share using Synology DSM and then use that as output folder.


2.
Email notifications are sent by the amc script itself, so if it errors out in an unexpected way, it won't be sending any email.

:idea: Conceptually, only the parent process calling filebot can reliably collect logs and send them, i.e. your transmission-postprocess.sh glue logic script. Please read

Shell: Select all

 Send console output as email
[/url] for details.

Re: Transmission - permission denied

Posted: 30 Mar 2020, 22:27
by ehjyen
Many thanks for your prompt reply.

There already is a /volume2/Media/.excludes file - it is the same file used by the FileBot scheduled task, which works fine without any issue. Is there any reason why the scheduled task and the amc script can't use the same .excludes file, or can I have more than 1?

Re: Transmission - permission denied

Posted: 31 Mar 2020, 07:05
by rednoah
ehjyen wrote: 30 Mar 2020, 22:27 There already is a /volume2/Media/.excludes file - it is the same file used by the FileBot scheduled task, which works fine without any issue. Is there any reason why the scheduled task and the amc script can't use the same .excludes file, or can I have more than 1?
You can use the same file, and you should. This is not a filebot issue. The OS just doesn't allow the filebot process to read the file according to the file permissions.

:idea: If you're having different users (e.g. root and admin) use the same file, e.g. if root initialized the file, with root permissions by default, then admin won't be allowed to read the file. If you make sure to always run filebot as the same user, i.e. admin user, then that won't be an issue.