[Synology NAS] Invalid usage: output folder must exist and must be a writable directory

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
stooovie
Posts: 11
Joined: 16 Sep 2013, 09:38

[Synology NAS] Invalid usage: output folder must exist and must be a writable directory

Post by stooovie »

Hi, I'm using Filebot Node for years and years but lately it's weird. Here's the situation:

-I run FB Node on Synology
-Transmission downloads arbitrary, manually added torrents to /Public/Downloads.
-Sonarr downloads episodes automatically to /Public/Downloads/sonarr
-I want the files to be recognized, renamed and moved to /Public/Video/Movies and /Public/Video/TV Shows and STAY available for seeding. Files do not need to leave the Syno at all. It all takes place on it.

I was trying "Move and symlink back" but that made a mess of files in the original Download folder that Windows sees even after deletion (??), Mac and Syno doesn't. I reckon this is due to differences between unix-based OSes and Windows.

What are the best practises? I did search but am none the wiser.

Also I'm now getting this.

Code: Select all

Initialize new disk cache: /volume1/@appstore/filebot/data/106247/cache/0
java.nio.file.AccessDeniedException: /volume1/Public/Downloads: /volume1/Public/Downloads
Invalid usage: output folder must exist and must be a writable directory: /volume1/Public/Video
Invalid usage: no input
java.nio.file.AccessDeniedException: /volume1/Public/Downloads: /volume1/Public/Downloads
Invalid usage: output folder must exist and must be a writable directory: /volume1/Public/Video
Invalid usage: no input

This is after a minor DSM update (I'm now on the latest DSM 6.2.4-25556, FBN 0.4.2.1). Basically everything worked for years and now it doesn't. Please help. Thanks.
User avatar
rednoah
The Source
Posts: 20080
Joined: 16 Nov 2011, 08:59

Re: Torrents and FB Node - hardlinks or what?

Post by rednoah »

Does the $USER that is running filebot have read / write access to the given input / output directories?

Code: Select all

Invalid usage: output folder must exist and must be a writable directory: /volume1/Public/Video

:!: Synology DSM 6.2.4 and DSM 7.0 no longer run 3rd party application as root, which is good and long overdue, but also moves some responsibility (i.e. granting permissions) as to what application can and cannot do onto the user.

rednoah wrote: 10 Jul 2014, 06:56 Package Permissions:
DSM 6.2.4 and DSM 7 restrict file system access by default. FileBot Node may not be able to access your files unless you explicitly grant permission first.

Image
:idea: Please read the FAQ and How to Request Help.
stooovie
Posts: 11
Joined: 16 Sep 2013, 09:38

Re: [Synology NAS] Invalid usage: output folder must exist and must be a writable directory

Post by stooovie »

Tried that, error no longer appears but the dry run is now running for more than 40minutes (there are three files in the source folder). Its a lowly DS216j but still, that seems excessive. The CPU is killed by the Java process but RAM stays under 70 pct usage.

Also, when I Schedule a task in Filebot Node, it tells me that "Prepared task can be called by link or Curl" but it doesn't get added into the system Task Scheduler. Is that also new? Do I paste the contents of the curl.sh file into the new User-defined script dialog in the Task scheduler?

Heres system info

Code: Select all

OpenJDK Client VM warning: Option --illegal-access is deprecated and will be removed in a future release.
FileBot 4.9.3 (r8340)
JNA Native: 6.1.0
MediaInfo: 20.08
Tools: p7zip/9.20 unrar/5.21
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2021-06-15 (r755)
Groovy: 3.0.7
JRE: OpenJDK Runtime Environment 16.0.2
JVM: 32-bit OpenJDK Client VM
JAVA_OPTS: -Xmx399m
CPU/MEM: 2 Core / 405 MB Max Memory / 24 MB Used Memory
OS: Linux (arm)
HW: Linux Syno 3.10.105 #25556 SMP Thu Mar 4 17:56:56 CST 2021 armv7l GNU/Linux synology_armada38x_ds216j
CPU/MEM: ARMv7 Processor rev 1 (v7l) | Marvell Armada 380/381/382/383/384/385/388 (Device Tree) [MemTotal: 524 MB | MemFree: 20 MB | SwapCached: 59 MB | SwapTotal: 2.1 GB | SwapFree: 1.7 GB]
STORAGE: ext4 [/] @ 941 MB | ext4 [/volume1] @ 3.6 TB
USER: FileBot
DATA: /volume1/@appstore/filebot/data/106247
Package: SPK
License: FileBot License P21813761 (Valid-Until: 2022-01-08)
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 20080
Joined: 16 Nov 2011, 08:59

Re: [Synology NAS] Invalid usage: output folder must exist and must be a writable directory

Post by rednoah »

:?: Where exactly is the filebot command is stuck? When FileBot Node calls filebot, you will see a log, and it'll print what it's doing line by line, so the last few lines of the output can give us a clue as to where it's stuck.



:idea: Extreme slowdown is usually related to not having enough RAM and the system turning to SWAP which is slower than RAM by multiple magnitudes. MemTotal: 524 MB should be enough to run filebot well, but if you have other memory-intensive services running at the same time (e.g. Plex) then the system may feel the crunch:

Code: Select all

JAVA_OPTS: -Xmx399m

:idea: According to filebot -script fn:sysinfo your system is already completely out of RAM and using 400 MB of SWAP already (a few spare MB of RAM are always reserved for the system) while running the sysinfo script, so running the amc script (which easily uses an extra 200 MB) may not be feasible on your device which seems to be pretty busy already running other things:

Code: Select all

MemTotal: 524 MB | MemFree: 20 MB | SwapCached: 59 MB | SwapTotal: 2.1 GB | SwapFree: 1.7 GB


:arrow: You could try to disable the Media Index and Media Parser options. These options will significantly reduce memory usage and may help make filebot run more smoothly on lower end or busy devices.




EDIT:

:arrow: You may need to create scheduled tasks manually in Synology Task Scheduler with DSM 6.2.4 and onwards. FileBot Node will give you the command you need to paste, but you still need to create the task manually.
:idea: Please read the FAQ and How to Request Help.
Post Reply