Page 1 of 1
Running filebot automatically / Synology DSM 7.0
Posted: 08 Dec 2022, 19:44
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).
Re: Running filebot automatically / Synology DSM 7.0
Posted: 08 Dec 2022, 20:02
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

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

Do
cat `where filebot-node-task` if you want to know what the
filebot-node-task command does:
Re: Running filebot automatically / Synology DSM 7.0
Posted: 08 Dec 2022, 23:08
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:/$
-------
Re: Running filebot automatically / Synology DSM 7.0
Posted: 09 Dec 2022, 03:47
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.

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.

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
cat /usr/local/bin/filebot-node-task
Re: Running filebot automatically / Synology DSM 7.0
Posted: 09 Dec 2022, 11:10
by astraub
It is working now! I indeed had forgotten to recreate the task ....
Re: Running filebot automatically / Synology DSM 7.0
Posted: 09 Dec 2022, 11:42
by rednoah
I see... We'll add better error messages with upcoming releases:
https://github.com/filebot/filebot-node ... dc7f14fc2b