Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Docker mkdir permission denied EACCES with --output flag #106

Closed
gh-giant opened this issue Feb 27, 2024 · 1 comment
Closed

Docker mkdir permission denied EACCES with --output flag #106

gh-giant opened this issue Feb 27, 2024 · 1 comment

Comments

@gh-giant
Copy link

Hi everybody,

thanks for your help in advance.

I build a docker image from the cloned GitHub repository with docker build -t wec .

After that I want to start the docker container from that image with docker run --rm -it --cap-add SYS_ADMIN --volume wecDir:/output wec https://www.edps.europa.eu/ --output 'EDPS' --overwrite true and store the output in a folder called "EDPS" with the --output flag on a docker volume.

I get an error:

node:fs:1382
  handleErrorFromBinding(ctx);
  ^

Error: EACCES: permission denied, mkdir 'EDPS'
    at Object.mkdirSync (node:fs:1382:3)
    at File._createLogDirIfNotExist (/home/collector/.config/yarn/global/node_modules/winston/lib/winston/transports/file.js:728:10)
    at new File (/home/collector/.config/yarn/global/node_modules/winston/lib/winston/transports/file.js:94:28)
    at Object.create (/home/collector/.config/yarn/global/node_modules/website-evidence-collector/lib/logger.js:66:7)
    at /home/collector/.config/yarn/global/node_modules/website-evidence-collector/bin/website-evidence-collector.js:19:32
    at Object.<anonymous> (/home/collector/.config/yarn/global/node_modules/website-evidence-collector/bin/website-evidence-collector.js:20:3)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: 'EDPS'
}

What am I missing out? I wasn't able to figure out the problem. Can anybody please help me?

@gh-giant
Copy link
Author

gh-giant commented Mar 7, 2024

I managed to get it work: I changed line 69 in Dockerfile to WORKDIR /output. Was WORKDIR /before.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant