Page 1 of 1

Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 10:59
by Friends4U
Hi,

I had Filebot Node running on DSM 7, I needed to restore all my settings :(
Now I wanted to upgrade and got the message: to remove something by running: sudo rm -v /usr/local/etc/nginx/conf.d/dsm.filebot-node.conf
Did that, and now when I run Filebot Node I get the message: Not found

What to do?

Re: Had it running on DSM 7...

Posted: 25 Aug 2021, 12:28
by Friends4U
Got it to work after completely uninstalling, restarting my NAS and re-installing the lot.
But now I have a new problem.

Invalid usage: output folder must exist and must be a writable directory

I removed the rights of the filebot user (because I had set them before (also on DSM 7), and re-added the rights... But still the same error.

Code: Select all

/video/Series/TMP: No Such File: /video/Series/TMP
Run script [fn:amc] at [Wed Aug 25 14:24:19 CEST 2021]
Parameter: ut_label = TV
Parameter: music = y
Parameter: unsorted = y
Parameter: subtitles = nld
Parameter: clean = y
Parameter: skipExtract = y
Parameter: seriesFormat = {n}\{s00}\{n} - {s00e00} - {t}
Parameter: excludeList = .excludes
Invalid usage: output folder must exist and must be a writable directory: /video/Series
Invalid usage: no input
Abort (×_×)

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

[Process error]

🔺 Exit Code: 4

Re: Had it running on DSM 7...

Posted: 25 Aug 2021, 12:41
by rednoah
/video does not exist, and we wouldn't expect such a folder to exist in the / root directory. If you've created a network share named "video" via Synology DSM, then it's going to be located at a path such as /volume1/video:

Code: Select all

/volume1/video

:?: What does ls -l / say?

Code: Select all

ls -l /

:arrow: Type / into the text field and then let auto-complete guide you. The auto-complete will only show you existing / valid input folder paths.

Re: Had it running on DSM 7...

Posted: 25 Aug 2021, 12:48
by Friends4U
Ohh how stupid, those fields were pre-populated after re-installing so I did not notice...
It works now! Tnx!

Only the cleanup does not work anymore (it did on DSM 6.x but never on 7).

Re: Had it running on DSM 7...

Posted: 25 Aug 2021, 12:52
by rednoah
Friends4U wrote: 25 Aug 2021, 12:48 Only the cleanup does not work anymore (it did on DSM 6.x but never on 7).
--def clean=y behavior? What does the console output say?

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 12:54
by Friends4U
Ehhhmmm... Where do I type that? :)

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 12:57
by Friends4U
He does cleanup, but not the folders... Lemme test once more.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 12:58
by rednoah
If you're using FileBot Node, then each input field will map to some amc script option. The black box with white text on the lower right will show you what command is being executed by FileBot Node (i.e. the first line) followed by the console output produced by that command as its being executed, printing exactly what it's doing (or trying to do) line by line.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 13:01
by Friends4U
Jup, it does cleanup except the root folders within the folder that I am checking.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 13:06
by rednoah
--def clean=y is conservative and won't delete files unless those files fit a strict set of criteria. Notably, the folder you pass in as input path is always preserved.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 15:37
by Friends4U
Sorry, I really do not know how to test: --def clean=y
Before I went to DSM 7, Filebot Node did clean up the directory Volume1/Series/TMP.

Ok, let's say I have the following structure:

Volume1/Series/TMP/Folder1/Subfolder2

Within Folder1 there is a movie file, Filebot node finds it and renames and moves it to Volume1/Series/NAME OF MOVIE/MOVIE
After that, he cleans up.
He cleans up Subfolder2 but leaves Folder1.
It's pointing to: Volume1/Video/TMP

So when I have 10 movies in there, the 10 folders of the movies stay, cleared of any data and subfolders.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 16:03
by rednoah
If Volume1/Series/TMP is passed as input, then Volume1/Series/TMP/Folder1/Subfolder2 and Volume1/Series/TMP/Folder1 then will be deleted. Assuming there's no reason that would prevent those folders from being deleted, e.g. folder not being empty after clutter files have been deleted.

The console output will list all the files that are being deleted. So if Volume1/Series/TMP/Folder1 contains files that aren't deleted, then Volume1/Series/TMP/Folder1 itself also won't be deleted.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 16:09
by Friends4U
Nope, Folder1 is not deleted and is completely empty... I think it's a bug on DSM 7? idk.
This is new behavior by the way... It has worked well for a few years now :)

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 16:13
by rednoah
Does the console output say that Volume1/Series/TMP/Folder1 is being deleted?

Code: Select all

Delete: Volume1/Series/TMP/Folder1
:arrow: If yes, but the folder isn't deleted, then FileBot tried to delete the file, but the operating system refused, perhaps due to permission issues.

:arrow: If no, FileBot didn't try to delete the folder for some reason, likely due to the folder not being empty, perhaps due to hidden files.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 16:23
by Friends4U
First of all, thank you for your help!

If that were the case, then ALL my folders magically have hidden files :)
I will share with you the console log, in this case, subfolder2 = yrte AND Folder1 = What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]

I guarantee you, there are no hidden files whatsoever in these folders

Code: Select all

filebot -script 'fn:amc' /volume1/video/Series/TMP/ --output /volume1/video/Series --action move -non-strict --order Airdate --conflict auto --lang nl --def 'ut_label=TV' 'music=y' 'unsorted=y' 'subtitles=nld' 'clean=y' 'skipExtract=y' 'seriesFormat={n}\{s00}\{n} - {s00e00} - {t}' 'excludeList=.excludes' --apply refresh --log all --log-file '/var/packages/filebot-node/var/filebot.log'

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

Run script [fn:amc] at [Wed Aug 25 17:32:07 CEST 2021]
Parameter: ut_label = TV
Parameter: music = y
Parameter: unsorted = y
Parameter: subtitles = nld
Parameter: clean = y
Parameter: skipExtract = y
Parameter: seriesFormat = {n}\{s00}\{n} - {s00e00} - {t}
Parameter: excludeList = .excludes
Argument[0]: /volume1/video/Series/TMP
Use excludes: /volume1/video/Series/.excludes (0)
Ignore system path: /volume1/video/Series/TMP/@eaDir
Ignore system path: /volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/@eaDir
Input: /volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/What.If.2021.S01E03.What.If.The.World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv
Process as TV Series [TV]
Group: {Series=true} => [What.If.2021.S01E03.What.If.The.World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv]
Get [Dutch] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No subtitle match by hash: /volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/What.If.2021.S01E03.What.If.The.World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv
Rename episodes using [TheTVDB] with [Airdate]
Lookup via [WHAT / IF, what if 2021]
Fetching episode data for [What If...?]
Fetching episode data for [WHAT / IF]
Fetching episode data for [What If (2018)]
Stripping invalid characters from new path: What If...?/01/What If...? - S01E03 - What If... The World Lost its Mightiest Heroes?
[MOVE] from [/volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/What.If.2021.S01E03.What.If.The.World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv] to [/volume1/video/Series/What If.../01/What If... - S01E03 - What If... The World Lost its Mightiest Heroes.mkv]
[REFRESH] Refresh File Services (/volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg])
[REFRESH] Refresh File Services (/volume1/video/Series/What If.../01)
Processed 1 file
Clean clutter files and empty folders
Delete /volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/yrte/RARBG.txt
Delete /volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/RARBG_DO_NOT_MIRROR.exe
Delete /volume1/video/Series/TMP/What.If.2021.S01E03.What.If.The..World.Lost.Its.Mightiest.Heroes.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/yrte
Done ヾ(@⌒ー⌒@)ノ

------------------------------------------
Another example:

Code: Select all

filebot -script 'fn:amc' /volume1/video/Series/TMP --output /volume1/video/Series --action move -non-strict --order Airdate --conflict auto --lang nl --def 'ut_label=TV' 'music=y' 'unsorted=y' 'subtitles=nld' 'clean=y' 'skipExtract=y' 'seriesFormat={n}\{s00}\{n} - {s00e00} - {t}' 'excludeList=.excludes' --apply refresh --log all --log-file '/var/packages/filebot-node/var/filebot.log'

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

Run script [fn:amc] at [Wed Aug 25 14:48:02 CEST 2021]
Parameter: ut_label = TV
Parameter: music = y
Parameter: unsorted = y
Parameter: subtitles = nld
Parameter: clean = y
Parameter: skipExtract = y
Parameter: seriesFormat = {n}\{s00}\{n} - {s00e00} - {t}
Parameter: excludeList = .excludes
Argument[0]: /volume1/video/Series/TMP
Use excludes: /volume1/video/Series/.excludes (0)
Ignore system path: /volume1/video/Series/TMP/@eaDir
Ignore system path: /volume1/video/Series/TMP/WH13/@eaDir
Input: /volume1/video/Series/TMP/WH13/Warehouse 13 - S03E10 - Insatiable.mkv
Process as TV Series [TV]
Group: {Series=true} => [Warehouse 13 - S03E10 - Insatiable.mkv]
Get [Dutch] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
Fetching [Dutch] subtitles [Warehouse.13.S03E10.HDTV.XviD-ASAP.[VTV].Insatiable-dut.srt] from [OpenSubtitles]
Export [Warehouse.13.S03E10.HDTV.XviD-ASAP.[VTV].Insatiable-dut.srt] as [SubRip / UTF-8]
Writing [Warehouse.13.S03E10.HDTV.XviD-ASAP.[VTV].Insatiable-dut.srt] to [Warehouse 13 - S03E10 - Insatiable.nld.srt]
Rename episodes using [TheTVDB] with [Airdate]
Lookup via [Warehouse 13]
Fetching episode data for [Warehouse 13]
Lookup via [Warehouse 13]
Fetching episode data for [Warehouse 13]
Activate License [P17151355] on [Wed Aug 25 14:49:26 CEST 2021]
[MOVE] from [/volume1/video/Series/TMP/WH13/Warehouse 13 - S03E10 - Insatiable.mkv] to [/volume1/video/Series/Warehouse 13/03/Warehouse 13 - S03E10 - Insatiable.mkv]
[MOVE] from [/volume1/video/Series/TMP/WH13/Warehouse 13 - S03E10 - Insatiable.nld.srt] to [/volume1/video/Series/Warehouse 13/03/Warehouse 13 - S03E10 - Insatiable.srt]
[REFRESH] Refresh File Services (/volume1/video/Series/TMP/WH13)
[REFRESH] Refresh File Services (/volume1/video/Series/Warehouse 13/03)
Processed 2 files
Clean clutter files and empty folders
Delete /volume1/video/Series/TMP/@eaDir/Warehouse 13 - S03E10 - Insatiable.mkv
Done ヾ(@⌒ー⌒@)ノ

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

[Process completed]

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 16:36
by rednoah
There's an @eaDir folder:

Code: Select all

Ignore system path: /volume1/video/Series/TMP/X/@eaDir
The @eaDir is not deleted:

Code: Select all

Delete /volume1/video/Series/TMP/X/yrte/RARBG.txt
Delete /volume1/video/Series/TMP/X/RARBG_DO_NOT_MIRROR.exe
Delete /volume1/video/Series/TMP/X/yrte
:arrow: The X folder is therefore not empty.


Friends4U wrote: 25 Aug 2021, 16:23 If that were the case, then ALL my folders magically have hidden files :)
Friends4U wrote: 25 Aug 2021, 16:23 I guarantee you, there are no hidden files whatsoever in these folders
Yes, and yes. Synology DSM is creating magic hidden @eaDir folders whenever a remote SMB client writes extended attributes.



:arrow: Good catch. That special case is not accounted for yet.



EDIT:

What are the contents of your @eaDir folder? The contents of the @eaDir are likely what prevents it from being deleted, which in turn prevents all parent folders from being deleted:

Code: Select all

find /path/to/@eaDir
:idea: The find command will print file paths line by line.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 25 Aug 2021, 21:34
by Friends4U
This behavior started when I upgraded to DSM 7.
But OK, I tested and there is no @eaDir in the folders that are not deleted.
I am also not remote SMB-in to these folders, I do everything from DSM.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 26 Aug 2021, 03:38
by rednoah
Friends4U wrote: 25 Aug 2021, 21:34 This behavior started when I upgraded to DSM 7.
@eaDir is a Synology thing. Please google "@eaDir" for details. Synology DSM is likely using this folder for a variety of things. Perhaps the SMB service stores some data there as soon as someone so much as views this folder. Perhaps the Media Index stores some data there during indexing, etc. Could be anything. You'll have to ask the Synology developers why Synology DSM is creating @eaDir in some folders but not others.

Friends4U wrote: 25 Aug 2021, 21:34 I tested and there is no @eaDir in the folders that are not deleted.
The console output you have posted has already confirmed that there are in fact @eaDir folders:

Code: Select all

Ignore system path: /volume1/video/Series/TMP/@eaDir
Ignore system path: /volume1/video/Series/TMP/WH13/@eaDir
:idea: The user-friendly Synology DSM WebUI will of course hide these Synology-specific @eaDir folders from you. You'll need to login via SSH to see what's really there.


:?: Please run this command and post the output:

Code: Select all

find /volume1/video/Series/TMP/@eaDir

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 26 Aug 2021, 10:13
by Friends4U
OMG you are right...

Currently this (while it's empty), but I will add two newly downloaded folders.

Code: Select all

admin@CB-NAS:~$ find /volume1/video/Series/TMP/@eaDir
/volume1/video/Series/TMP/@eaDir
/volume1/video/Series/TMP/@eaDir/Stargate.Origins.S00E01.WEBRip.x264-ION10@SynoResource
admin@CB-NAS:~$

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 26 Aug 2021, 10:17
by Friends4U
Jup, he add's the @eaDir folder.
Probably because of the indexing station.

Code: Select all

admin@CB-NAS:~$ find /volume1/video/Series/TMP/
/volume1/video/Series/TMP/
/volume1/video/Series/TMP/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]
/volume1/video/Series/TMP/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv
/volume1/video/Series/TMP/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/@eaDir
/volume1/video/Series/TMP/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/@eaDir/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv
/volume1/video/Series/TMP/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/@eaDir/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv/SYNOINDEX_MEDIA_INFO
/volume1/video/Series/TMP/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/RARBG.txt
/volume1/video/Series/TMP/What.If.2021.S01E02.What.If.TChalla.Became.a.Star-Lord.1080p.DSNP.WEBRip.DDP5.1.x264-FLUX[rarbg]/RARBG_DO_NOT_MIRROR.exe
/volume1/video/Series/TMP/@eaDir
/volume1/video/Series/TMP/@eaDir/Stargate.Origins.S00E01.WEBRip.x264-ION10@SynoResource
/volume1/video/Series/TMP/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]
/volume1/video/Series/TMP/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]/@eaDir
/volume1/video/Series/TMP/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]/@eaDir/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP.mkv
/volume1/video/Series/TMP/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]/@eaDir/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP.mkv/SYNOINDEX_MEDIA_INFO
/volume1/video/Series/TMP/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP.mkv
/volume1/video/Series/TMP/What.If.S01E01.What.If.Captain.Carter.Were.The.First.Avenger.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]/RARBG.txt
admin@CB-NAS:~$

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 26 Aug 2021, 10:26
by Friends4U
Did some reading but it's very complicated (if possible) to remove those directories and to stop them from being created.
Is there a possibility that Filebot Node can delete these if present?

Source: https://community.synology.com/enu/foru ... ort=oldest

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 26 Aug 2021, 10:31
by rednoah
I see. name@SynoResource files are not recognized as known clutter files, so the cleaner script will leave them alone, which then prevents the rest of the folder hierarchy from being deleted. I'll add that pattern to the cleaner script. At this point in time, there is no easy solution for you though, other than all the "delete @eaDir folders" discussions you will have found via Google already.

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 26 Aug 2021, 10:58
by Friends4U
Yeah, I am a bit used to it already :)
I'll wait for the update.

Tnx!

Re: Invalid usage: output folder must exist and must be a writable directory: /video

Posted: 26 Aug 2021, 11:01
by Friends4U
rednoah wrote: 26 Aug 2021, 10:31 I see. name@SynoResource files are not recognized as known clutter files, so the cleaner script will leave them alone, which then prevents the rest of the folder hierarchy from being deleted. I'll add that pattern to the cleaner script. At this point in time, there is no easy solution for you though, other than all the "delete @eaDir folders" discussions you will have found via Google already.
Only this one: /volume1/video/Series/TMP/@eaDir/Stargate.Origins.S00E01.WEBRip.x264-ION10@SynoResource
But that's really very old.

The new contents of the @eaDir are not @SynoResource, so I don't think you should add that specific pattern. I would advise you just to add the @eaDir as clutter.