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 register layer: failed to Lchown #2390

Open
LordZanna opened this issue Jun 19, 2024 · 8 comments
Open

failed to register layer: failed to Lchown #2390

LordZanna opened this issue Jun 19, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@LordZanna
Copy link

What happened

Launhing "./start prod up --all_analyzers -- -d" I get this error message:
"failed to register layer: failed to Lchown "/usr/local/lib/node_modules/box-js/node_modules/optionator/CHANGELOG.md" for UID 110779, GID 100 (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid): lchown /usr/local/lib/node_modules/box-js/node_modules/optionator/CHANGELOG.md: invalid argument"

Environment

  1. OS: Ubuntu 23.04
  2. IntelOwl version: 6.0.4
  3. Docker version 25.0.2, build 29cf629
  4. Docker Compose version v2.24.5

What did you expect to happen

I expected it will started wihout errors

How to reproduce your issue

In sequence i have done:
./initialize.sh
./start prod up -- d
./start prod down
./start prod up --all_analyzers -- -d

Error messages and logs

"failed to register layer: failed to Lchown "/usr/local/lib/node_modules/box-js/node_modules/optionator/CHANGELOG.md" for UID 110779, GID 100 (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid): lchown /usr/local/lib/node_modules/box-js/node_modules/optionator/CHANGELOG.md: invalid argument"

@LordZanna LordZanna added the bug Something isn't working label Jun 19, 2024
@drosetti
Copy link
Contributor

drosetti commented Jun 19, 2024

It seems a problem related to the user ID range. Did you try to increase it in the files /etc/subuid and /etc/subgid ?

@LordZanna
Copy link
Author

Yes, I'm launching docker as root and I have increased to 655350.
Now I have started every analyzer one by one I have restricted the problem to "malware_tools_analyzers".
This is the only parameter that gives the error.

@drosetti
Copy link
Contributor

Yes, I'm launching docker as root and I have increased to 655350.

Inside the container malware_tools_analyzers ?

@LordZanna
Copy link
Author

No, I might have made a mistake because I am not familiar with docker. I did it on the host.
I don't know how to modify these files inside the image.

@drosetti
Copy link
Contributor

Don't worry, there's no problem :)
In case the container is running you can login with sudo docker exec -ti intelowl_malware_tools_analyzers /bin/bash and edit the file /etc/subuid
In case it's down I suggest to:
1 - docker cp intelowl_malware_tools_analyzers:/etc/subuid . in this way you copy the file from the container to your host
2 - edit the file subuid
3 - docker cp subuid intelowl_malware_tools_analyzers:/etc/subuid
4 - start again

In this way the file inside the container should be updated

@LordZanna
Copy link
Author

LordZanna commented Jun 19, 2024

Thanks for help but I don't have the image because it vanishes after the error mentioned above.
Doing docker images it doesn't shows up.

I've tried this:
docker pull intelowlproject/intelowl_malware_tools_analyzers:"v6.0.4"
Download started and than it goes on to extract.

I obtain this message:
"failed to register layer: failed to Lchown "/usr/local/lib/node_modules/box-js/node_modules/optionator/CHANGELOG.md" for UID 110779, GID 100 (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid): lchown /usr/local/lib/node_modules/box-js/node_modules/optionator/CHANGELOG.md: invalid argument"

The image vanished again.

May I do something else to download it?

@drosetti
Copy link
Contributor

Sorry if I take time to answer, but I was on vacation.
Talking about the vanishing, it's a bit weird: with docker images ls -a I see the image is not in the list.
After I run the command docker pull intelowlproject/intelowl_malware_tools_analyzers:"v6.0.4" the image is correctly listed.

Also the error should appear when you run the container, not when you download the image.

@LordZanna
Copy link
Author

No problem, nothing urgent.
I don't know what I'm doing wrong, but attached you will find what I did and what I can see after doing it.

2024-06-28_11h00_11

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