Skip to content

Docker container EACCESS permission denied mkdir 'data/upload' #4370

Not planned
@Delgerskhn

Description

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

πŸ›‘οΈ Security Policy

  • I agree to have read this project Security Policy

Description

When I build my Docker image targeting the release stage and run the container, it throws an EACCES permission denied error.

πŸ‘Ÿ Reproduction steps

  1. Build the Docker image targeting the release stage.
  2. Run the container.

πŸ‘€ Expected behavior

The Docker container should run without any errors.

πŸ˜“ Actual Behavior

The Docker container throws the following error:
uptime-kuma | Trace: Error: EACCES: permission denied, mkdir 'data/upload/' uptime-kuma | at Object.mkdirSync (node:fs:1414:3)

🐻 Uptime-Kuma Version

2.0.0-dev

πŸ’» Operating System and Arch

Ubuntu 20.04

🌐 Browser

Microsoft Edge

πŸ‹ Docker Version

Docker version 24.0.7, build afdd53b

🟩 NodeJS Version

20.x

πŸ“ Relevant log output

uptime-kuma | Trace: Error: EACCES: permission denied, mkdir 'data/upload/' uptime-kuma | at Object.mkdirSync (node:fs:1414:3) uptime-kuma | at Database.initDataDir (/app/server/database.js:140:16) uptime-kuma | at /app/server/server.js:172:14 uptime-kuma | at Object. (/app/server/server.js:1571:3) uptime-kuma | at Module._compile (node:internal/modules/cjs/loader:1233:14) uptime-kuma | at Module._extensions..js (node:internal/modules/cjs/loader:1287:10) uptime-kuma | at Module.load (node:internal/modules/cjs/loader:1091:32) uptime-kuma | at Module._load (node:internal/modules/cjs/loader:938:12) uptime-kuma | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) uptime-kuma | at node:internal/main/run_main_module:23:47 { uptime-kuma | errno: -13, uptime-kuma | syscall: 'mkdir', uptime-kuma | code: 'EACCES', uptime-kuma | path: 'data/upload/' uptime-kuma | } uptime-kuma | at process.unexpectedErrorHandler (/app/server/server.js:1814:13) uptime-kuma | at process.emit (node:events:514:28) uptime-kuma | at emit (node:internal/process/promises:150:20) uptime-kuma | at processPromiseRejections (node:internal/process/promises:284:27) uptime-kuma | at process.processTicksAndRejections (node:internal/process/task_queues:96:32) uptime-kuma | If you keep encountering errors, please report to [https://github.com/louislam/uptime-kuma/issues](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) uptime-kuma | 2024-01-15T06:57:36Z [] INFO: Cannot write to error.log uptime-kuma exited with code 0

Activity

Delgerskhn

Delgerskhn commented on Jan 15, 2024

@Delgerskhn
Author

The same src works on my local machine.

Delgerskhn

Delgerskhn commented on Jan 15, 2024

@Delgerskhn
Author

After I manually created the upload, screenshots, docker-tls directories inside data folder in project src, and build the docker image, this error is resolved.

CommanderStorm

CommanderStorm commented on Jan 15, 2024

@CommanderStorm
Collaborator

Build the Docker image targeting the release stage

What is the release stage? Are you refering to FROM louislam/uptime-kuma:1.23?

CommanderStorm

CommanderStorm commented on Jan 15, 2024

@CommanderStorm
Collaborator

I just noticed that you have written that you are running against 2.0.0-dev instead of our current released version 1.23.11 in the description.

Said version is not yet done (pre-beta) => not yet supported.
Please refer to #4171 for additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Docker container EACCESS permission denied mkdir 'data/upload' Β· Issue #4370 Β· louislam/uptime-kuma