puppetlabs/puppet · error · ArgumentError
' ' is not executable
Error message
'%{exe}' is not executable What it means
Posix exec provider: the target file exists but lacks the executable bit for the running user, so exec refuses to run it.
Solutions
- Set the executable bit, e.g. chmod +x /path/to/command
- Ensure the Puppet user has execute permission on the file
- Invoke the command through an interpreter (e.g. sh /path/to/script) if it cannot be made executable
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/puppet/provider/exec/posix.rb:39 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/9815f847e8663fe2.
Report an issue: GitHub.
Appendix: source
Thrown at lib/puppet/provider/exec/posix.rb:39
but prevents the use of globbing and shell built-ins (including control
logic like "for" and "if" statements).
If the use of globbing and shell built-ins is desired, please check
the `shell` provider
EOT
# Verify that we have the executable
def checkexe(command)
exe = extractexe(command)
if File.expand_path(exe) == exe
if !Puppet::FileSystem.exist?(exe)
raise ArgumentError, _("Could not find command '%{exe}'") % { exe: exe }
elsif !File.file?(exe)
raise ArgumentError, _("'%{exe}' is a %{klass}, not a file") % { exe: exe, klass: File.ftype(exe) }
elsif !File.executable?(exe)
raise ArgumentError, _("'%{exe}' is not executable") % { exe: exe }
end
return
end
if resource[:path]
Puppet::Util.withenv :PATH => resource[:path].join(File::PATH_SEPARATOR) do
return if which(exe)
end
end
# 'which' will only return the command if it's executable, so we can't
# distinguish not found from not executable
raise ArgumentError, _("Could not find command '%{exe}'") % { exe: exe }
end
def run(command, check = false)
if resource[:umask]View on GitHub (pinned to e227c27540)