Writing a file: permission denied
Posted: 17 Mar 2012, 18:02
I want filebot to run each time qBittorent is done with a new file. qBittorent offers a feature for this. I call a groovyscript with filebot. When I do this from commandline it works perfectly, but not from qBittorent. So To do some testing I wanted to check whether the script runs by writing the arguments it gets to a file. Still with me? Ok then. To do this I added the following to my script:
To test this I ran the script via filebot through commandline. Then I get this error:
When I run the script directly from Eclipse it works without a problem.
This is Ubuntu 11.10 with java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
Code: Select all
File file = new File("/home/myusername/funbottest")
file.write("test")
Code: Select all
AccessControlException: access denied ("java.io.FilePermission" "/home/myusername/funbottest" "write")
java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/myusername/funbottest" "write")
at sdy.media.MR.run(Script3.groovy:6)
at sdy.media.MR$run.call(Unknown Source)
at sdy.media.Script3.run(Script3.groovy:12)
at net.sourceforge.filebot.cli.ScriptShell$2.run(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.run(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.run(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
This is Ubuntu 11.10 with java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)