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

mkfifo fail when running as non root user #125906

Open
emperorkebab opened this issue Jun 19, 2024 · 3 comments
Open

mkfifo fail when running as non root user #125906

emperorkebab opened this issue Jun 19, 2024 · 3 comments
Labels
branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community T-dev-inf X-blathers-triaged blathers was able to find an owner

Comments

@emperorkebab
Copy link

emperorkebab commented Jun 19, 2024

Describe the problem

When running crdb docker container with the option user: 1000:1000 the container fails with the following log error:

mkfifo: cannot create fifo 'server_fifo': Permission denied

which i think originates from here:

local start_node_query=( exec $cockroach_entrypoint start-single-node \


To Reproduce

  1. Create dirs mycrdb/certs and mycrdb/data (owned by user 1000, and default perms 755) to avoid "could not write CAs" cockroach error when initializing.
  2. Buid the container using this compose:
mycrdb:
    image: cockroachdb/cockroach:latest
    container_name: mycrdb
    command: "start-single-node --advertise-addr mycrdb"
    user: 1000:1000
    ports:
      - "9090:8080"
      - "26257:26257"
    networks:
      - mynetwork
    volumes:
      - ./mycrdb/certs:/cockroach/certs:rw
      - ./mycrdb/data:/cockroach/cockroach-data:rw
  1. See container logs.
docker logs -f mycrdb

Expected behavior

The cockroachdb container gets generated without errors, and the generated content in the bind volumes are owned by the user with id 1000 instead of root.


Additional data / screenshots

Related to:


Environment:

  • CockroachDB version v24.1.0
  • Server OS: Linux/Ubuntu

Additional context
What was the impact?
Can't proceed with container hardening.

Jira issue: CRDB-39655

@emperorkebab emperorkebab added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Jun 19, 2024
Copy link

blathers-crl bot commented Jun 19, 2024

Hi @emperorkebab, please add branch-* labels to identify which branch(es) this C-bug affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Copy link

blathers-crl bot commented Jun 19, 2024

Hello, I am Blathers. I am here to help you get the issue triaged.

Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.

I have CC'd a few people who may be able to assist you:

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-triaged blathers was able to find an owner labels Jun 19, 2024
@emperorkebab
Copy link
Author

I just realized this could made irrelevant by #85062 if it gets merged

@jlinder jlinder added the branch-master Failures and bugs on the master branch. label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community T-dev-inf X-blathers-triaged blathers was able to find an owner
Projects
None yet
Development

No branches or pull requests

3 participants