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

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

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

pranaysashank
Copy link
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

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
5 checks passed
@Mic92
Copy link
Owner

Mic92 commented Jan 13, 2025

Sorry. Missed that one.

@usertam
Copy link

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