我修改了/etc/apparmor.d/opencpu.d/custom
文件,以允许opencpu操纵本地文件。实际上,此命令可以成功运行:
curl http://localhost/ocpu/library/testg/R/hello -d "x='/home/qh/opencputmp/a.txt'&y='/home/qh/opencputmp/b.txt'"
/ocpu/tmp/x0b321396c2/R/hello
/ocpu/tmp/x0b321396c2/R/.val
/ocpu/tmp/x0b321396c2/source
/ocpu/tmp/x0b321396c2/console
/ocpu/tmp/x0b321396c2/info
/ocpu/tmp/x0b321396c2/files/DESCRIPTION
但是为什么我不能使用云来运行它,结果如下:
curl https://qwqaijingjing.ocpu.io/test/R/hello -d "x='/home/qh/opencputmp/a.txt'&y='/home/qh/opencputmp/b.txt'"
cannot open the connection
In call:
file(file, ifelse(append, "a", "w"))
他们使用不同的安全文件吗?
如果有人可以帮助我,我将不胜感激。 谢谢。