UPDATE #2: Again jeroen, between you and I, this will be like the new FAQ for OpenCPU <3. the sandbox is a great idea cant we just put the scripts inside the sandbox? I don't want to take away the security with the sandbox off, can you make a way to allow only certain R packages full access to the server? I am fine with manually approving which ones will have full access, Like an admin panel of sorts? Is there a way that an admin such as myself can put my own scripts inside the server sandbox so that it can run moodifications with full access, whereas other users won't be able to make them?
UPDATE : The openCPU has some sort of protection against the system from running files not in a datastore. How do I disable this, I just want it to run like R does on the same machine. I know potentially people can access files outside of the datastore openCPU system without having the /datastore/ infront of a file url
I placed a file in /opt/myData/test.csv I can run in R on the same box the function I want and it works readTheFile("/opt/myData/test.csv");
Now when I try to use OpenCPU to call it using REST it does not work! I have tried even putting the file on a remote server and reading the file in as Endpoint : /R/mypackage/readTheFile filePath = "http://www.myotherserver.com/test.csv"
Also I tried this below, which gave me cannot open URL 'http://localhost/R/store/opt/Data-Sets/rds' Endpoint : /R/mypackage/readTheFile filePath = "/opt/myData/test.csv"
Please Help
(Edit Aug 2013): In the new version 1.0 of OpenCPU, the security profiles in the OpenCPU cloud server are located in /etc/apparmor.d/opencpu.d
. The easiest way to add custom rules is by adding them to the /etc/apparmor.d/opencpu.d/custom
file. See the OpenCPU server manual for more information.
You should probably study a bit of AppArmor syntax to understand how the profiles are structured. See for more information the RAppArmor package and JSS article.