{"record":{"id":"7e5c93b6ec5460a0","repo":"puppetlabs/puppet","slug":"failed-to-set-owner-to-should-detail-7e5c93","errorCode":null,"errorMessage":"Failed to set owner to '%{should}': %{detail}","messagePattern":"Failed to set owner to '%(.+?)': %(.+?)","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/file/windows.rb","lineNumber":48,"sourceCode":"\n  # We use users and groups interchangeably, so use the same methods for both\n  # (the type expects different methods, so we have to oblige).\n  alias :uid2name :id2name\n  alias :gid2name :id2name\n\n  alias :name2gid :name2id\n  alias :name2uid :name2id\n\n  def owner\n    return :absent unless resource.stat\n\n    get_owner(resource[:path])\n  end\n\n  def owner=(should)\n    set_owner(should, resolved_path)\n  rescue => detail\n    raise Puppet::Error, _(\"Failed to set owner to '%{should}': %{detail}\") % { should: should, detail: detail }, detail.backtrace\n  end\n\n  def group\n    return :absent unless resource.stat\n\n    get_group(resource[:path])\n  end\n\n  def group=(should)\n    set_group(should, resolved_path)\n  rescue => detail\n    raise Puppet::Error, _(\"Failed to set group to '%{should}': %{detail}\") % { should: should, detail: detail }, detail.backtrace\n  end\n\n  def mode\n    if resource.stat\n      mode = get_mode(resource[:path])\n      mode ? mode.to_s(8).rjust(4, '0') : :absent","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/file/windows.rb#L30-L66","documentation":"Error \"Failed to set owner to '%{should}': %{detail}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/provider/file/windows.rb:48 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"}