Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error: EACCES: permission denied, mkdir 'user/uploads' on docker swarm #521

Open
1 task done
alf1e opened this issue Feb 27, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@alf1e
Copy link

alf1e commented Feb 27, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Experiencing error when starting for first time.

Error: EACCES: permission denied, mkdir 'user/uploads'
    at mkdirSync (node:fs:1391:3)
    at mkDirAndCopy (node:internal/fs/cp/cp-sync:268:3)
    at onDir (node:internal/fs/cp/cp-sync:263:25)
    at getStats (node:internal/fs/cp/cp-sync:167:12)
    at copyDir (node:internal/fs/cp/cp-sync:284:21)
    at onDir (node:internal/fs/cp/cp-sync:264:10)
    at cpSyncFn (node:internal/fs/cp/cp-sync:61:10)
    at checkParentDir (node:internal/fs/cp/cp-sync:159:10)
    at Object.cpSync (node:fs:3020:3) {
  errno: -13,
  syscall: 'mkdir',
  path: 'user/uploads'
  code: 'EACCES',
}

Expected Behavior

Shoudl start and create config

Steps To Reproduce

  1. Install bot through portainer stack on latest version
  2. Experience Error

Environment

Docker (swarm) Latest

Anything else?

No response

@alf1e alf1e added the bug Something isn't working label Feb 27, 2024
@alf1e alf1e changed the title [BUG] <title> [BUG] Error: EACCES: permission denied, mkdir 'user/uploads' on docker swarm Feb 27, 2024
@eartharoid
Copy link
Member

@alf1e as a temporary workaround, you can remove (or comment out) the volume that is mounted at ./user. Currently, no data is stored in the folder, only configuration files that are generated when the container is first created.

bot/docker-compose.yml

Lines 28 to 29 in b8972ba

volumes:
- tickets-bot:/home/container/user

@korneliuszw
Copy link

korneliuszw commented Oct 11, 2024

I solved this by mounting a directory and changing it's owner to 1001:1001

chown 1001:1001 ./tickets-bot

However the problem exists, at least on 4.2 image. I'm not sure why exactly because Dockerfile already has USER directive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants