intelowlproject / IntelOwl

IntelOwl: manage your Threat Intelligence at scale
https://intelowlproject.github.io
GNU Affero General Public License v3.0
3.19k stars 400 forks source link

failed to register layer: failed to Lchown #2390

Open LordZanna opened 1 week ago

LordZanna commented 1 week ago

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"

drosetti commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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

Inside the container malware_tools_analyzers ?

LordZanna commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 5 days ago

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 commented 4 days ago

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