{"record":{"id":"058e0362574c6b0f","repo":"puppetlabs/puppet","slug":"the-parameter-parameter-for-the-setting-name","errorCode":null,"errorMessage":"The %{parameter} parameter for the setting '%{name}' must be either 'root' or 'service', not '%{value}'","messagePattern":"The %(.+?) parameter for the setting '%(.+?)' must be either 'root' or 'service', not '%(.+?)'","errorType":"validation","errorClass":"Puppet::Settings::SettingError","httpStatus":null,"severity":"error","filePath":"lib/puppet/settings/file_setting.rb","lineNumber":205,"sourceCode":"  # @param option [String] Extra file operation mode information to use\n  #   (defaults to read-only mode 'r')\n  #   This is the standard mechanism Ruby uses in the IO class, and therefore\n  #   encoding may be explicitly like fmode : encoding or fmode : \"BOM|UTF-*\"\n  #   for example, a:ASCII or w+:UTF-8\n  def open(option = 'r', &block)\n    controlled_access do |mode|\n      Puppet::FileSystem.open(file, mode, option, &block)\n    end\n  end\n\n  private\n\n  def file\n    Puppet::FileSystem.pathname(value)\n  end\n\n  def unknown_value(parameter, value)\n    raise SettingError, _(\"The %{parameter} parameter for the setting '%{name}' must be either 'root' or 'service', not '%{value}'\") % { parameter: parameter, name: name, value: value }\n  end\n\n  def controlled_access(&block)\n    chown = nil\n    if Puppet.features.root?\n      chown = [owner, group]\n    else\n      chown = [nil, nil]\n    end\n\n    Puppet::Util::SUIDManager.asuser(*chown) do\n      # Update the umask to make non-executable files\n      Puppet::Util.withumask(File.umask ^ 0o111) do\n        yielded_value = case mode\n                        when String\n                          mode.to_i(8)\n                        when NilClass\n                          0o640","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/file_setting.rb#L187-L223","documentation":"Error \"The %{parameter} parameter for the setting '%{name}' must be either 'root' or 'service', not '%{value}'\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/settings/file_setting.rb:205 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":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}