2015-10-24 09:11:36 +00:00
|
|
|
# encoding: utf-8
|
|
|
|
# author: Christoph Hartmann
|
|
|
|
# author: Dominik Richter
|
|
|
|
#
|
|
|
|
# prepares a sample file for verification
|
|
|
|
|
2015-11-17 21:14:05 +00:00
|
|
|
if node['platform_family'] != 'windows'
|
2015-10-24 09:11:36 +00:00
|
|
|
|
2015-12-18 21:58:14 +00:00
|
|
|
gid = case node['platform_family']
|
|
|
|
when 'aix'
|
|
|
|
'system'
|
|
|
|
when 'freebsd'
|
|
|
|
'wheel'
|
2016-01-28 13:51:54 +00:00
|
|
|
when 'solaris', 'solaris2'
|
|
|
|
'sys'
|
2015-12-18 21:58:14 +00:00
|
|
|
else
|
|
|
|
'root'
|
|
|
|
end
|
|
|
|
|
2015-11-17 21:14:05 +00:00
|
|
|
|
|
|
|
file '/tmp/file' do
|
|
|
|
mode '0765'
|
|
|
|
owner 'root'
|
|
|
|
group gid
|
|
|
|
content 'hello world'
|
|
|
|
end
|
|
|
|
|
2016-07-10 18:40:06 +00:00
|
|
|
file '/tmp/sfile' do
|
|
|
|
mode '7765'
|
|
|
|
owner 'root'
|
|
|
|
group gid
|
|
|
|
content 'hello suid/sgid/sticky'
|
|
|
|
end
|
|
|
|
|
2015-11-17 21:14:05 +00:00
|
|
|
directory '/tmp/folder' do
|
|
|
|
mode '0567'
|
|
|
|
owner 'root'
|
|
|
|
group gid
|
|
|
|
end
|
2015-10-25 20:36:49 +00:00
|
|
|
|
|
|
|
end
|