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

permission denied error while trying to create a verifiable build #1262

Open
abhijeetbhagat opened this issue Aug 8, 2023 · 3 comments
Open
Labels
bug Something isn't working

Comments

@abhijeetbhagat
Copy link

getting a permission denied error:

(rust:nightly) ↪ cargo contract build --verifiable
 [1/3] Image does not exist. Pulling one from the registry
4.0.0-alpha: Pulling from paritytech/contracts-verifiable
7eaf8c23e6d5: Pull complete
6f3e3b4845f0: Pull complete
ac4d710538ca: Pull complete
01f0e1379a81: Pull complete
Digest: sha256:a3cc95b6e3d54981774e20760da094ba038e666190c57bb01f932c145f1b4f71
Status: Downloaded newer image for paritytech/contracts-verifiable:4.0.0-alpha
 [2/3] Started the build inside the container: ink-verified-verifiablecontract-34568
warning: nothing to print.

To find dependencies that require specific target platforms, try to use option `--target all` first, and then narrow your search scop
e accordingly.
 [1/*] Building cargo project
warning: You are using a rustc version that might emit unsupported wasm instructions. Build using a version lower than 1.70.0 to make
 sure your contract will deploy.
    Updating crates.io index
  Downloaded cc v1.0.77
  Downloaded dlmalloc v0.2.3
  Downloaded getopts v0.2.21
  Downloaded rustc-demangle v0.1.21
  Downloaded hashbrown v0.13.1
  Downloaded compiler_builtins v0.1.92
  Downloaded libc v0.2.143
  Downloaded 7 crates (1.1 MB) in 0.56s
error: failed to create directory `/contract/target`

Caused by:
  Permission denied (oERROR: command ["/usr/local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo", "build", "--color=alw
ays", "--target=wasm32-unknown-unknown", "-Zbuild-std=core,alloc", "--no-default-features", "--release", "--target-dir=/contract/targ
et/ink", "-Zbuild-std-features=panic_immediate_abort"] exited with code 101
ERROR: Failed to read build result from docker build

To Reproduce
Steps to reproduce the behavior:

  1. cargo contract new verifiablecc
  2. cd verifiablecc
  3. cargo contract build --verifiable

Expected behavior
a verifiable build should be created.

Environment (please complete the following information):

  • OS: Ubuntu 22.04.3 LTS
  • cargo-contract version: cargo-contract-contract 4.0.0-alpha-78a2473-x86_64-unknown-linux-gnu
  • ink! version: 4.2.0

Additional warning

warning: You are using a rustc version that might emit unsupported wasm instructions. Build using a version lower than 1.70.0 to make sure your contract will deploy.
@abhijeetbhagat abhijeetbhagat added the bug Something isn't working label Aug 8, 2023
@SkymanOne
Copy link
Contributor

Since we are modifying files with cargo, docker process and user must be in the same Linux group. Have you done docker post-installation steps?

@abhijeetbhagat
Copy link
Author

yes, i am running docker as a non-root user i.e. without needing sudo.

@SkymanOne
Copy link
Contributor

Are you running as a user with sudo privileges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants