Running filebot automatically / Synology DSM 7.0

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
astraub
Posts: 3
Joined: 08 Dec 2022, 19:30

Running filebot automatically / Synology DSM 7.0

Post by astraub »

Hi,

I have a permission issue when running filebot using the task manager:

Code: Select all

Aufgabe: filebot-node-task 0
Start: Thu, 08 Dec 2022 20:39:24 GMT
Ende: Thu, 08 Dec 2022 20:39:25 GMT
Aktueller Status: 1 (Unterbrochen)
Standardausgabe/Fehler:
tee: /var/packages/filebot-node/var/log/0.log: Permission denied
Looking at the given directory as well as its top directory is owned by user "filebot" ....

I run the "filebot-node-task 0" scripts as "admin" user.

What is going wrong here? It appears that the filebot application cannot write into the logs and task directories
though these are owned by user "filebot".

Greetings
Andreas

PS: where can I find these scripts? I would prefer to start such a script by JDownloader (non Docker version).
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Running filebot automatically / Synology DSM 7.0

Post by rednoah »

:?: What does ls say?

Code: Select all

ls -l /var/packages/filebot-node/var/log/0.log
:?: Have you tried fixing the permissions to give your admin user read/write access to that file?

Code: Select all

chmod a+rw /var/packages/filebot-node/var/log/0.log



:idea: You can call filebot-node-task 0 on the command-line. That is the script:

Code: Select all

filebot-node-task 0 
:idea: Do cat `where filebot-node-task` if you want to know what the filebot-node-task command does:

Code: Select all

cat `where filebot-node-task`
:idea: Please read the FAQ and How to Request Help.
astraub
Posts: 3
Joined: 08 Dec 2022, 19:30

Re: Running filebot automatically / Synology DSM 7.0

Post by astraub »

I found a 0.log with owner root and deleted it. (I assume this had been created by a synology task trying to use root as owner).
I changed the owner of the task back to admin and also make sure that the log directory is empty and it and the parent directory
are owned by filebot.

I also could not find the 'where' command on my Synology NAS (maybe just the PATH is not set correctly?) - so this may not be part
of the standard commands.

Calling the script directly from the command lines delivers:

----------

Code: Select all

schlumpf@Limonchen_IV:/$ filebot-node-task 0
tee: /var/packages/filebot-node/var/log/0.log: Permission denied

Did you read the manual?
└ https://www.filebot.net/manpage.html

Did you quote and escape your arguments correctly?
└ https://www.filebot.net/help/args.html

args[1] = @/var/packages/filebot-node/var/task/0.args

Invalid @file path: /var/packages/filebot-node/var/task/0.args
-------------

At that time - here what is in this directory:

Code: Select all

schlumpf@Limonchen_IV:/$ ls -l /var/packages/filebot-node/var/log
total 4
-rw-r--r-- 1 FileBot FileBot 862 Dec  8 20:18 R1670527120764.log
schlumpf@Limonchen_IV:/$ 
-----------

Here the content of the 'task' directory:

Code: Select all

schlumpf@Limonchen_IV:/$ ls -al /var/packages/filebot-node/var/task
total 0
drwxr-xr-x 1 FileBot FileBot   0 Dec  8 20:15 .
drwxr-xr-x 1 FileBot FileBot 116 Dec  8 20:18 ..
schlumpf@Limonchen_IV:/$ 

-------
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Running filebot automatically / Synology DSM 7.0

Post by rednoah »

astraub wrote: 08 Dec 2022, 23:08 I found a 0.log with owner root and deleted it. (I assume this had been created by a synology task trying to use root as owner).
Please create a new prepared task in FileBot Node WebUI and then check the pristine permissions. FileBot Node will pre-create the log file and set permissions to 0666 -rw-rw-rw so that all users can use the prepared task.

:idea: This error message might indicate that you have manually deleted the log file, which results in the file being recreated with the current user and default permissions, which will break things for other users:

Code: Select all

tee: /var/packages/filebot-node/var/log/0.log: Permission denied
EDIT: It could also indicate that the file doesn't exist in the first place and can't be created. That would be unusual because you're not supposed to know filebot-node-task 0 until after you have created a prepared task in the FileBot Node WebUI already.


:idea: The corresponding 0.args file should exist and should be readable by all users so that all users can use the task:

Code: Select all

ls -l /var/packages/filebot-node/var/task/0.args

EDIT:

:?: :?: :?: Did you perhaps not create a prepared task yet? If /var/packages/filebot-node/var/task is empty, then you haven't created any prepared tasks yet. You need to create a prepared task in the FileBot Node WebUI first by clicking on the Schedule button.

:?: :?: :?: What is your use case? What exactly are you trying to do? Are you using FileBot Node and filebot-node-task for any particular reason?





astraub wrote: 08 Dec 2022, 23:08 I also could not find the 'where' command on my Synology NAS (maybe just the PATH is not set correctly?) - so this may not be part
of the standard commands.
Maybe try which instead. It's just about getting the absolute path to the executable for a given command:

Code: Select all

which filebot-node-task

Code: Select all

cat /usr/local/bin/filebot-node-task
:idea: Please read the FAQ and How to Request Help.
astraub
Posts: 3
Joined: 08 Dec 2022, 19:30

Re: Running filebot automatically / Synology DSM 7.0

Post by astraub »

It is working now! I indeed had forgotten to recreate the task ....
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Running filebot automatically / Synology DSM 7.0

Post by rednoah »

I see... We'll add better error messages with upcoming releases:
https://github.com/filebot/filebot-node ... dc7f14fc2b
:idea: Please read the FAQ and How to Request Help.
Post Reply