Itamaeは '4xxx'を無視しませんが、まずchmodを呼び出してからchownを呼び出します。問題はchownはchmodによって設定されたsuidを削除します。あなたは
itamae local recipe.rb --log-level=debug
は2つのIFSの位置を交換してそれを見ることができ
:https://github.com/itamae-kitchen/itamae/blob/master/lib/itamae/resource/file.rbでデフaction_create(オプション)とデフaction_edit(オプション)で
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
はトリック
を行います
私はパッチを提出します。一方
、これは動作しているようです:
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
** file **リソースで 'user'パラメータを使用してみることができますか:https://github.com/itamae-kitchen/itamae/wiki/file-resource – Nikhil
' user'にはどのような値を設定すればよいですか?パラーム? – ironsand
ここに私がコミットしたパッチがあります: https://github.com/itamae-kitchen/itamae/commit/bdcba8e19bcd1f36a2f5af6ab51733c5682013d3 –