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

failed to initialize terrascan. error : failed to install policies #614

Closed
christophetd opened this issue Mar 14, 2021 · 5 comments · Fixed by #618
Closed

failed to initialize terrascan. error : failed to install policies #614

christophetd opened this issue Mar 14, 2021 · 5 comments · Fixed by #618
Assignees
Labels

Comments

@christophetd
Copy link

  • terrascan version: v1.4.0
  • Operating System: Ubuntu 18.04 LTS

Description

Running terrascan init or terrascan scan yields the following output:

2021-03-14T11:00:42.987+0100    error   cli/init.go:42  failed to initialize terrascan. error : failed to install policies to '/home/christophetd/.terrascan'. error: 'rename /tmp/terrascan-522112316 /home/christophetd/.terrascan: invalid cross-device link'

What I Did

@amirbenv
Copy link
Contributor

Thanks for reporting. We are working on improvements for the init command.

@devang-gaur
Copy link
Contributor

@christophetd hey. did you run this inside a container ? if yes, mind sharing the oci image or the Dockerfile ?

@devang-gaur
Copy link
Contributor

@christophetd could you please mention the exact steps to replicate? I tested terrascan init inside an ubuntu:18.04 container. It seemed to work fine.

@tiagocosta-viavarejo
Copy link

tiagocosta-viavarejo commented Mar 15, 2021

I've the same issue.
I've tried to compile and I got the same error.

tested into:

  • Debian 10
  • Fedora 33
  • Fedora 32

[04:15 PM]-[gar0t0@gandalf]-[~]-
$ terrascan init
2021-03-15T16:15:37.184-0300 error cli/init.go:42 failed to initialize terrascan. error : failed to install policies to '/home/gar0t0/.terrascan'. error: 'rename /tmp/terrascan-117976497 /home/gar0t0/.terrascan: invalid cross-device link'

[04:15 PM]-[gar0t0@gandalf]-[~]-
$ terrascan version
version: v1.4.0

When I ran into a container, it work.

@christophetd
Copy link
Author

I ran it on my main machine, not inside a container. I posted the exact commands I ran

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

Successfully merging a pull request may close this issue.

4 participants