puppetlabs/puppet · error · Puppet::Error

Failed to set owner to '%{should}': %{detail}

Error message

Failed to set owner to '%{should}': %{detail}

What it means

Error "Failed to set owner to '%{should}': %{detail}" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/provider/file/posix.rb:110

      warning _("Apparently using negative UID (%{currentvalue}) on a platform that does not consistently handle them") % { currentvalue: currentvalue }
      currentvalue = :silly
    end

    currentvalue
  end

  def owner=(should)
    # Set our method appropriately, depending on links.
    if resource[:links] == :manage
      method = :lchown
    else
      method = :chown
    end

    begin
      File.send(method, should, nil, resource[:path])
    rescue => detail
      raise Puppet::Error, _("Failed to set owner to '%{should}': %{detail}") % { should: should, detail: detail }, detail.backtrace
    end
  end

  def group
    stat = resource.stat
    return :absent unless stat

    currentvalue = stat.gid

    # On OS X, files that are owned by -2 get returned as really
    # large GIDs instead of negative ones.  This isn't a Ruby bug,
    # it's an OS X bug, since it shows up in perl, too.
    if currentvalue > Puppet[:maximum_uid].to_i
      warning _("Apparently using negative GID (%{currentvalue}) on a platform that does not consistently handle them") % { currentvalue: currentvalue }
      currentvalue = :silly
    end

    currentvalue

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/provider/file/posix.rb:110 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/ca4eaea56c588f4b. Report an issue: GitHub.