EU-EDPS / website-evidence-collector

Project moved to https://code.europa.eu/EDPS/website-evidence-collector ! The tool Website Evidence Collector (WEC) automates the website evidence collection of storage and transfer of personal data. https://edps.europa.eu/press-publications/edps-inspection-software_en
https://code.europa.eu/EDPS/website-evidence-collector
European Union Public License 1.2
426 stars 73 forks source link

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

Closed gh-giant closed 8 months ago

gh-giant commented 9 months ago

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 commented 8 months ago

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