Class | Chef::ScanAccessControl
In: | lib/chef/scan_access_control.rb
Parent: | Object

## ScanAccessControl

Reads Access Control Settings on a file and writes them out to a resource (should be the current_resource), attempting to match the style used by the new resource, that is, if users are specified with usernames in new_resource, then the uids from stat will be looked up and usernames will be added to current_resource.

### Why?

FileAccessControl objects may operate on a temporary file, in which case we won‘t know if the access control settings changed (ex: rendering a template with both a change in content and ownership). For auditing purposes, we need to record the current state of a file system entity.

### Methods

current_group current_mode current_owner lookup_gid lookup_uid new set_all! set_group set_mode set_owner stat

### Attributes

current_resource | [R] |
new_resource | [R] |

### Public Class methods

new(new_resource, current_resource)

### Public Instance methods

current_group()
current_mode()
current_owner()
lookup_gid()
lookup_uid()
set_all!()

Modifies @current_resource, setting the current access control state.

set_group()

Set the group attribute of `current_resource` to whatever the current state is.

set_mode()
set_owner()

Set the owner attribute of `current_resource` to whatever the current state is. Attempts to match the format given in new_resource: if the new_resource specifies the owner as a string, the username for the uid will be looked up and owner will be set to the username, and vice versa.

stat()

[Validate]