Itamae doesn't ignore '4xxx', but it calls chmod first and then chown. Problem is : chown removes the suid set by chmod.
You can see it with
itamae local recipe.rb --log-level=debug
Swapping positions of the two ifs :
if attributes.mode
run_specinfra(:change_file_mode, change_target, attributes.mode)
end
if attributes.owner || attributes.group
run_specinfra(:change_file_owner, change_target, attributes.owner, attributes.group)
end
in def action_create(options) and def action_edit(options) at https://github.com/itamae-kitchen/itamae/blob/master/lib/itamae/resource/file.rb does the trick
I'll submit a patch.
In the meantime, this seems to work :
jobber = '/usr/local/bin/jobber'
file jobber do
action :edit
owner 'jobber_client'
group 'root'
mode '0755'
end
execute "setuid #{jobber}" do
command "chmod u+s \"#{jobber}\""
end