Skip to content

Create /.cntr/pid file with 0644 permissions#422

Merged
Mic92 merged 1 commit intoMic92:masterfrom
pranaysashank:master
Jan 13, 2025
Merged

Create /.cntr/pid file with 0644 permissions#422
Mic92 merged 1 commit intoMic92:masterfrom
pranaysashank:master

Conversation

@pranaysashank
Copy link
Copy Markdown
Contributor

With the default 0600 permissions, cntr exec inside nix sandbox fails with the following error:

[nixbld@localhost:/var/lib/cntr/build/hello-2.12.1]$ cntr exec "$SHELL"
failed to open /.cntr/pid, Permission denied (os error 13)

@usertam
Copy link
Copy Markdown

usertam commented Jan 13, 2025

I tried to work around this by using the --effective-user switch, also doesn't work:

# cntr attach --effective-user root -t command cntr-/nix/store/fhnsyfci26z3382l3gm209l0hwb44rxa-firecracker-1.10.1
thread 'main' panicked at /build/cntr-1.5.4-vendor.tar.gz/clap_builder/src/parser/error.rs:32:9:
Mismatch between definition and access of `effective-user`. Could not downcast to TypeId(0xb98b1b7157a6417863eb502cd6cb5d6d), need to downcast to TypeId(0xa85a74628ddea0610b6bc322b7fe2016)

# cntr attach --effective-user=0 -t command cntr-/nix/store/fhnsyfci26z3382l3gm209l0hwb44rxa-firecracker-1.10.1
thread 'main' panicked at /build/cntr-1.5.4-vendor.tar.gz/clap_builder/src/parser/error.rs:32:9:
Mismatch between definition and access of `effective-user`. Could not downcast to TypeId(0xb98b1b7157a6417863eb502cd6cb5d6d), need to downcast to TypeId(0xa85a74628ddea0610b6bc322b7fe2016)

@Mic92 Mic92 merged commit a24f992 into Mic92:master Jan 13, 2025
@Mic92
Copy link
Copy Markdown
Owner

Mic92 commented Jan 13, 2025

Sorry. Missed that one.

@usertam
Copy link
Copy Markdown

usertam commented Jan 13, 2025

Thanks for the fix!

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

Successfully merging this pull request may close these issues.

3 participants