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

failed to Lchown "/api/node_modules/statuses/HISTORY.md" #5

Open
timdonovanuk opened this issue Mar 11, 2023 · 4 comments
Open

failed to Lchown "/api/node_modules/statuses/HISTORY.md" #5

timdonovanuk opened this issue Mar 11, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@timdonovanuk
Copy link

Hi,

Getting a strange error. I run other docker images on the same server with no issue, and have tried tweaking the environmental variables but no dice.

docker: failed to register layer: Error processing tar file(exit status 1): failed to Lchown "/api/node_modules/statuses/HISTORY.md" for UID 1516583083, GID 0 (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid): lchown /api/node_modules/statuses/HISTORY.md: invalid argument.
See 'docker run --help'.

Using:

docker run -d \
  --name tasks.md \
  -p 7070:8080 \
  -v /opt/tasks/cards/:/api/files/ \
  --restart unless-stopped \
  baldissaramatheus/tasks.md

Thanks!

@timdonovanuk
Copy link
Author

timdonovanuk commented Mar 11, 2023

Hmm I'm using docker in an LXC container which apparently is relevant: https://old.reddit.com/r/MeshCentral/comments/10vk3bq/issue_installing_fresh_with_docker_using/

But not had it with other images. The fact that there are only 3 hits on google for this error tells me its rather unique 😄

@BaldissaraMatheus
Copy link
Owner

Thank you for reporting the issue, to be honest I never messed with LXC containers before so I cannot be sure right away about the cause. Though I suspect the problem has to do with UIDs and GIDs available in that environment, since in the docker image there is a step for setting the files permissions as the user's UID and GID so they are not owned by root.

I'll take a look into that as soon as possible

@BaldissaraMatheus BaldissaraMatheus added the bug Something isn't working label Mar 11, 2023
@timdonovanuk
Copy link
Author

Yep for sure, it's the line fs.promises.chown(files/${lane}/${name}.md, PUID, PGID); causing issues, but not sure why! Had a play around with the various docker ways to force uid/guid (user: 0:0, PUID env vars etc.) but no luck.

I'm probably quite an edge case to be honest, so thank you :)

@BaldissaraMatheus
Copy link
Owner

I couldn't look into it yet, but someone mentioned in a reddit thread:

If it's an unprivileged LXC, the uid and gid of root get remapped. I would assume gid 0 is part of the problem?
Pretty sure they add 100000 to the uid/gid mapped to the host.

This thread/comment might be helpful? https://www.reddit.com/r/Proxmox/comments/11gvp19/comment/jaqir3y/

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

2 participants