DSM planned task AccessDeniedException

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Bassail
Posts: 2
Joined: 28 Dec 2016, 10:35

DSM planned task AccessDeniedException

Post by Bassail »

Hello,

I'm trying to use Filebot in a planned task in Synology DSM 6.
But... It seems there is a problem.
I created the task with the help of Filebot Node (which works fine) (Filebot through command lines works fine too).
Here are the logs I got from the execution of the task :

Code: Select all

++ id -u
+ '[' 1026 -eq 0 ']'
++ whoami
+ export USER=toto
+ USER=toto
+ export DATA=/usr/local/filebot-node/data
+ DATA=/usr/local/filebot-node/data
+ export TASK=1482873645334
+ TASK=1482873645334
++ free
++ awk -vm=1024 -vp=0.7 '/Mem:/ {printf "-Xmx%dm", ($2*p)/m; exit}'
+ export JAVA_OPTS=-Xmx636m
+ JAVA_OPTS=-Xmx636m
+ filebot @/usr/local/filebot-node/data/task/1482873645334.args
+ tee -a /usr/local/filebot-node/data/log/1482873645334.log
tee: /usr/local/filebot-node/data/log/1482873645334.log: Permission denied
Error during startup: java.nio.file.AccessDeniedException: /volume1/@appstore/filebot-node/data/filebot.log
java.nio.file.AccessDeniedException: /volume1/@appstore/filebot-node/data/filebot.log
	at net.filebot.Main.initializeLogging(Main.java:416)
	at net.filebot.Main.main(Main.java:108)

+ exit 1
Obviously there is a problem with the rights in my configuration, but I don't know what exactly.
My user "toto" belongs to the "admin" user group...
I followed the installation documentation on filebot.net an executed everything with this same user "toto".

I tried to execute the task with the admin user. Everything works fine, but the files then belong to the admin user, so it causes some problems to me after...

If someone knows who to provide a solution to my problem...

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

Re: DSM planned task AccessDeniedException

Post by rednoah »

The user should be "admin" and not a user you have created yourself (and thus lack certain permissions).

Using custom users is not supported, although it may very well work if you set up the permissions correctly (which is not always trivial if it doesn't just work out of the box).

You can use the --def exec option to change the owner and permissions after processing.
:idea: Please read the FAQ and How to Request Help.
Bassail
Posts: 2
Joined: 28 Dec 2016, 10:35

Re: DSM planned task AccessDeniedException

Post by Bassail »

Hi,
Thanks for the quick answer.
I will execute the script as admin then.

The problem now is that if I run the script as admin, the files that filebot move will belong to admin... Is there a solution to keep the files belonging to "toto" ?

Sorry for bad english

EDIT : Sorry, you already answered to that.

Thank you very much !
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: DSM planned task AccessDeniedException

Post by rednoah »

e.g. call chown after processing:

Code: Select all

--def exec="chown -R user:group '{folder}'"
:idea: Please read the FAQ and How to Request Help.
Post Reply