Skip to content

Rootless Podman with SELinux File Permission Issue #1565

@FlorianLudwig

Description

@FlorianLudwig

Checklist

Describe your issue

When using cross on a system with SE Linux enabled,

What target(s) are you cross-compiling for?

No response

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.5

Example

Running on fedora 40 with podman and SELinux enabled in a project that contains a local dependency:

[dependencies]
lib_shared = { path = "../lib_shared" }
cross build --release --target x86_64-unknown-linux-gnu

Caused by:
  failed to load source for dependency `lib_shared`

Caused by:
  Unable to update /home/fludwig/projects/test/lib_shared

Caused by:
  failed to read `/home/fludwig/projects/test/lib_shared/Cargo.toml`

Caused by:
  Permission denied (os error 13)

Additional information / notes

Instead of using :z which relabels the files in a mount, using --security-opt label=disable is a much more reliable option in my experience. It also fixes the issue for me in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions