{"record":{"id":"5787db170c9089db","repo":"kubernetes/kops","slug":"invalid-file-mode-for-q-q","errorCode":null,"errorMessage":"invalid file mode for %q: %q","messagePattern":"invalid file mode for %q: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/nodetasks/file.go","lineNumber":251,"sourceCode":"\nfunc (i *InstallFile) CheckChanges(a, e, changes *InstallFile) error {\n\treturn nil\n}\n\nfunc (i *InstallFile) RenderInstall(_ *install.InstallTarget, a, e, changes *InstallFile) error {\n\tvar actual *File\n\tif a != nil {\n\t\tactual = &a.File\n\t}\n\n\treturn i.File.RenderLocal(nil, actual, &e.File, &changes.File)\n}\n\nfunc (_ *File) RenderLocal(_ *local.LocalTarget, a, e, changes *File) error {\n\tdirMode := os.FileMode(0o755)\n\tfileMode, err := fi.ParseFileMode(fi.ValueOf(e.Mode), 0o644)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid file mode for %q: %q\", e.Path, fi.ValueOf(e.Mode))\n\t}\n\n\tif a != nil {\n\t\tif e.IfNotExists {\n\t\t\tklog.V(2).Infof(\"file exists and IfNotExists set; skipping %q\", e.Path)\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tchanged := false\n\tswitch e.Type {\n\tcase FileType_Symlink:\n\t\tif changes.Symlink != nil {\n\t\t\t// This will currently fail if the target already exists.\n\t\t\t// That's probably a good thing for now ... it is hard to know what to do here!\n\t\t\tklog.Infof(\"Creating symlink %q -> %q\", e.Path, *changes.Symlink)\n\t\t\terr := os.Symlink(*changes.Symlink, e.Path)\n\t\t\tif err != nil {","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/nodetasks/file.go#L233-L269","documentation":"Error \"invalid file mode for %q: %q\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/nodeup/nodetasks/file.go:251 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}