Method: Puppet::Util::Windows::Security#set_group
- Defined in:
- lib/puppet/util/windows/security.rb
#set_group(group_sid, path) ⇒ Object
Set the owner of the object referenced by path to the specified group_sid. The group sid should be of the form “S-1-5-32-544” and can either be a user or group. Any user with WRITE_OWNER access to the object can change the group (regardless of whether the current user belongs to that group or not).
141 142 143 144 145 146 147 148 |
# File 'lib/puppet/util/windows/security.rb', line 141 def set_group(group_sid, path) sd = get_security_descriptor(path) if group_sid != sd.group sd.group = group_sid set_security_descriptor(path, sd) end end |