命令行运行程序 selenium EACCES:权限被拒绝,mkdir

我使用 docker-compose


在带有 Dockerfile 的 ubuntu 容器中我安装


运行 npm install -g selenium-side-runner


然后我运行尝试从 www-data 用户运行


selenium-side-runner --output-directory /tmp /application/src/www.opendi.co.uk.side --server http://chrome-hub.local:4444/wd/hub

得到


EACCES: permission denied, mkdir 'side-suite-www.opendi.co.uk'

at Object.mkdirSync (fs.js:987:3)

at runProject (/usr/lib/node_modules/selenium-side-runner/dist/index.js:240:15)

at runAll (/usr/lib/node_modules/selenium-side-runner/dist/index.js:345:10)

at Object. (/usr/lib/node_modules/selenium-side-runner/dist/index.js:390:3)

at Module._compile (internal/modules/cjs/loader.js:1063:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

at Module.load (internal/modules/cjs/loader.js:928:32)

at Function.Module._load (internal/modules/cjs/loader.js:769:14)

at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)

at internal/main/run_main_module.js:17:47 {

errno: -13,

syscall: 'mkdir',

code: 'EACCES',

path: 'side-suite-www.opendi.co.uk'

selenium-side-runner 尝试在哪里创建此目录?在 /tmp ?在这个位置它可以做到这一点


慕婉清6462132
浏览 99回答 1
1回答

HUX布斯

/application/src/www.opendi.co.uk.side这是docker内部不存在的路径。它正在尝试创建www.opendi.co.uk.side目录删除它并尝试:selenium-side-runner --output-directory /tmp --server http://chrome-hub.local:4444/wd/hub
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript