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

incorrect UID (erigon user 100 instead of 1000) leads to permission denied issue #12931

Closed
bap2pecs opened this issue Nov 30, 2024 · 1 comment

Comments

@bap2pecs
Copy link

System information

Erigon version: erigontech/erigon:v2.60.10

Consensus Layer: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.1.2

Chain/Network: Sepolia

Config

  erigon:
    image: erigontech/erigon:v2.60.10
    user: "1000:1000"
    container_name: erigon-sepolia
    command: |
      --chain=sepolia --prune=hrtc
      --torrent.download.rate=512mb
      --authrpc.addr="erigon" --authrpc.jwtsecret=/jwt.hex --authrpc.vhosts="erigon"
      --http.api="eth,debug,net,engine,web3" --http.addr="0.0.0.0" --http.corsdomain="*" --http.vhosts='*'
      --ws
    ports:
      - "8545:8545"
      - "8546:8546"
      - "8551:8551"
      - "30303:30303"
    volumes:
      - ${ERIGON_DATA_DIR}:/home/erigon/.local/share/erigon
    restart: unless-stopped
    configs:
      - jwt.hex

Problem

Launching the containers, I got

[EROR] [11-30|12:59:21.904] catch panic                              err="mkdir /.local/share/erigon/sepolia: permission denied" stack="[main.go:29 panic.go:770 rw_dir.go:34 dirs.go:79 flags.go:1386 flags.go:1368 node.go:96 main.go:59 make_app.go:54 command.go:276 app.go:333 app.go:307 main.go:34 proc.go:271 asm_amd64.s:1695]"

Debugging

after running docker exec erigon-sepolia id erigon, I got uid=100(erigon) gid=1000(erigon) groups=1000(erigon)

so the root cause is the user erigon has id 100 instead of 1000

but per https://github.com/erigontech/erigon?tab=readme-ov-file#docker-permissions-error, the UID should be 1000

Right now my workaround is to

  • changed user: "1000:1000" to `user: "100:1000"
  • then run sudo chown 100:1000 $ERIGON_DATA_DIR
@AskAlexSharov
Copy link
Collaborator

duplicate of #12900 - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants