Chore: Restore permissions used to create plugins dir (#94139)

eleijonmarck/datasourcepermissions/add-additional-info-to-logs
Andres Martinez Gotor 9 months ago committed by GitHub
parent bcee44db5f
commit 4c4f7a3331
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      pkg/cmd/grafana-cli/commands/install_command.go

@ -51,7 +51,10 @@ func validateInput(c utils.CommandLine) error {
fileInfo, err := os.Stat(pluginsDir)
if err != nil {
if err = os.MkdirAll(pluginsDir, 0o750); err != nil {
// If the directory does not exist, try to create it with permissions enough
// so the server running Grafana can write to it to install new plugins.
// nolint: gosec
if err = os.MkdirAll(pluginsDir, os.ModePerm); err != nil {
return fmt.Errorf("pluginsDir (%s) is not a writable directory", pluginsDir)
}
return nil

Loading…
Cancel
Save