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

Error: fork/exec xxxx.tflint.d/plugins/tflint-ruleset-azurerm: permission denied #101

Closed
vparmeland opened this issue Mar 10, 2021 · 8 comments

Comments

@vparmeland
Copy link

vparmeland commented Mar 10, 2021

Hello,

I'm trying to use your plugin but :
Failed to initialize plugins. An error occurred:
Error: fork/exec /Users/myUser/.tflint.d/plugins/tflint-ruleset-azurerm: permission denied

❯ TFLINT_LOG=debug tflint
20:10:42 config.go:96: [INFO] Load config: .tflint.hcl
20:10:42 config.go:311: [DEBUG] Config loaded
20:10:42 config.go:312: [DEBUG]   Module: true
20:10:42 config.go:313: [DEBUG]   Force: false
20:10:42 config.go:314: [DEBUG]   IgnoreModules: map[string]bool{}
20:10:42 config.go:315: [DEBUG]   Varfiles: []string{"terraform.tfvars"}
20:10:42 config.go:316: [DEBUG]   Variables: []string{}
20:10:42 config.go:317: [DEBUG]   DisabledByDefault: false
20:10:42 config.go:318: [DEBUG]   Rules: map[string]*tflint.RuleConfig{}
20:10:42 config.go:319: [DEBUG]   Plugins: map[string]*tflint.PluginConfig{"azurerm":(*tflint.PluginConfig)(0xc000546510)}
20:10:42 option.go:49: [DEBUG] CLI Options
20:10:42 option.go:50: [DEBUG]   Module: false
20:10:42 option.go:51: [DEBUG]   Force: false
20:10:42 option.go:52: [DEBUG]   IgnoreModules: map[string]bool{}
20:10:42 option.go:53: [DEBUG]   EnableRules: []string(nil)
20:10:42 option.go:54: [DEBUG]   DisableRules: []string(nil)
20:10:42 option.go:55: [DEBUG]   Only: []string(nil)
20:10:42 option.go:56: [DEBUG]   EnablePlugins: []string(nil)
20:10:42 option.go:57: [DEBUG]   Varfiles: []string{}
20:10:42 option.go:58: [DEBUG]   Variables: []string{}
20:10:42 loader.go:57: [INFO] Initialize new loader
20:10:42 loader.go:82: [INFO] Load configurations under .
20:10:42 loader.go:97: [INFO] Module inspection is enabled. Building a root module with children...
20:10:42 loader.go:170: [INFO] Load values files
20:10:42 loader.go:237: [INFO] Load `terraform.tfvars`
20:10:42 loader.go:237: [INFO] Load `terraform.tfvars`
20:10:42 runner.go:50: [INFO] Initialize new runner for root
20:10:42 discovery.go:68: [INFO] Plugin `azurerm` found
2021-03-10T20:10:42.336+0100 [DEBUG] plugin: starting plugin: path=/Users/MyUser/.tflint.d/plugins/tflint-ruleset-azurerm args=[/Users/MyYser/.tflint.d/plugins/tflint-ruleset-azurerm]
Failed to initialize plugins. An error occurred:

Error: fork/exec /Users/MyUser/.tflint.d/plugins/tflint-ruleset-azurerm: permission denied

MacOs (BigSur) with TF v0.13.3 & go1.16 darwin/amd64
Already changed folder/files permissions

Thanks

@mike-serchenia
Copy link

mike-serchenia commented Mar 12, 2021

the same story but with
tflint-ruleset-google

15:25:16 option.go:49: [DEBUG] CLI Options
15:25:16 option.go:50: [DEBUG]   Module: false
15:25:16 option.go:51: [DEBUG]   Force: false
15:25:16 option.go:52: [DEBUG]   IgnoreModules: map[string]bool{}
15:25:16 option.go:53: [DEBUG]   EnableRules: []string(nil)
15:25:16 option.go:54: [DEBUG]   DisableRules: []string(nil)
15:25:16 option.go:55: [DEBUG]   Only: []string(nil)
15:25:16 option.go:56: [DEBUG]   EnablePlugins: []string{"google"}
15:25:16 option.go:57: [DEBUG]   Varfiles: []string{}
15:25:16 option.go:58: [DEBUG]   Variables: []string{"project_id=dev-test-01-295921"}
15:25:16 langserver.go:15: Starting language server...
15:25:16 config.go:96: [INFO] Load config: .tflint.hcl
15:25:16 config.go:108: [INFO] Default config file is not found. Ignored
15:25:16 config.go:117: [INFO] Load fallback config: /root/.tflint.hcl
15:25:16 config.go:125: [INFO] Fallback config file is not found. Ignored
15:25:16 config.go:127: [INFO] Use default config
15:25:16 handler.go:33: [INFO] Plugin `aws` is automatically enabled when the `aws` plugin configuration not found
15:25:16 discovery.go:68: [INFO] Plugin `google` found
2021-03-12T15:25:16.775+0300 [DEBUG] plugin: starting plugin: path=/root/.tflint.d/plugins/tflint-ruleset-google args=[/root/.tflint.d/plugins/tflint-ruleset-google]
15:25:16 langserver.go:19: Failed to start language server: fork/exec /root/.tflint.d/plugins/tflint-ruleset-google: permission denied

@mike-serchenia
Copy link

@nk74 found it
in my case, I was uploading the plugin to
/root/.tflint.d/plugins/tflint-ruleset-google after I've changed to /root/.tflint.d/plugins/ it passed

@wata727
Copy link
Member

wata727 commented Mar 14, 2021

Umm... I was unable to reproduce this issue. Below is the environment I have confirmed:

$ tflint -v
TFLint version 0.25.0
+ ruleset.azurerm (0.9.0)

If you're only having issues with v0.9, it's possible that the update to Go 1.16 is affecting you.
Can you provide a Docker image etc. that can reproduce this problem?

@krynn1
Copy link

krynn1 commented Mar 16, 2021

I have the same problem but iwth the azure plugin. I am running go version go1.16.1 darwin/amd64

@mike-serchenia
Copy link

mike-serchenia commented Mar 16, 2021

@krynn1 upload the plugin in ~/.tflint.d/plugins/
not in ~/.tflint.d/plugins/tflint-ruleset-google/

@krynn1
Copy link

krynn1 commented Mar 18, 2021

@krynn1 upload the plugin in ~/.tflint.d/plugins/
not in ~/.tflint.d/plugins/tflint-ruleset-google/

I realized I had to make build the plugin. Is there be output if it runs successfully but doesn't find anything?

@mike-serchenia
Copy link

@krynn1 upload the plugin in ~/.tflint.d/plugins/
not in ~/.tflint.d/plugins/tflint-ruleset-google/

I realized I had to make build the plugin. Is there be output if it runs successfully but doesn't find anything?

No, but you can set log level to debug. You'll see if plugin was found

@wata727
Copy link
Member

wata727 commented Jul 23, 2021

We have found that this error occurs if a directory with the same name exists. The bug has been fixed in terraform-linters/tflint#1169.

This issue will be closed, although there may be other causes. If you face a similar issue, open a new issue.

@wata727 wata727 closed this as completed Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants