Module: Chef::Mixin::EnforceOwnershipAndPermissions
- Included in:
- Provider::CookbookFile, Provider::Directory, Provider::File, Provider::Link, Provider::RemoteDirectory, Provider::RemoteFile, Provider::Template
- Defined in:
- lib/chef/mixin/enforce_ownership_and_permissions.rb
Instance Method Summary collapse
- #access_controls ⇒ Object
-
#enforce_ownership_and_permissions ⇒ Object
will set the proper user, group and permissions using a platform specific version of Chef::FileAccessControl.
Instance Method Details
#access_controls ⇒ Object
25 26 27 |
# File 'lib/chef/mixin/enforce_ownership_and_permissions.rb', line 25 def access_controls @access_controls ||= Chef::FileAccessControl.new(current_resource, new_resource, self) end |
#enforce_ownership_and_permissions ⇒ Object
will set the proper user, group and permissions using a platform specific version of Chef::FileAccessControl
32 33 34 35 |
# File 'lib/chef/mixin/enforce_ownership_and_permissions.rb', line 32 def access_controls.set_all new_resource.updated_by_last_action(true) if access_controls.modified? end |