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

cargo/rust permission denied #571

Open
tseeling opened this issue Jul 7, 2023 · 2 comments
Open

cargo/rust permission denied #571

tseeling opened this issue Jul 7, 2023 · 2 comments

Comments

@tseeling
Copy link

tseeling commented Jul 7, 2023

I try to build sydent 2.5.5 with the supplied Dockerfile but I receive permission denied while compiling cryptography.
When removing the USER definition from the Dockerfile (i.e. running the build step as root) works but I'm not sure if the venv is complete when doing it this way.

cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib --
          Updating crates.io index
       Downloading crates ...
        Downloaded parking_lot_core v0.9.7
      error: failed to download replaced source registry `crates-io`
      
      Caused by:
        failed to create directory `/cargo/registry/cache/index.crates.io-d11c229612889eed`
      
      Caused by:
        Permission denied (os error 13)
      
          =============================DEBUG ASSISTANCE=============================
...
          Python: 3.11.4
          platform: Linux-4.18.0-425.19.2.el8_7.s390x-s390x-with-glibc2.31
          pip: n/a
          setuptools: 68.0.0
          setuptools_rust: 1.6.0
          rustc: 1.70.0 (90c541806 2023-05-31)
          =============================DEBUG ASSISTANCE=============================
      
      error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib --` failed with code 101
      [end of output]
      ```
@tseeling
Copy link
Author

tseeling commented Jul 7, 2023

Using some ls -lA for debugging I noticed that all files and directories belong to sydent:sydent except the /home/sydent/src which belonged root:root. I added a chown and could build the container with python 3.11.4 and rust 1.70.

@reivilibre
Copy link
Contributor

any chance you'd be happy to open a PR with the specific chown you used? :)

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

No branches or pull requests

2 participants