Manage information about files on the minion, set/read user, group data
depends: |
|
---|
Change the group of a file
CLI Example:
salt '*' file.chgrp c:\temp\test.txt administrators
Chown a file, pass the file the desired user and group
CLI Example:
salt '*' file.chown c:\temp\test.txt myusername administrators
Return the id of the group that owns a given file
CLI Example:
salt '*' file.get_gid c:\temp\test.txt
Return the group that owns a given file
CLI Example:
salt '*' file.get_group c:\temp\test.txt
Return the mode of a file
Right now we're just returning 777 because Windows' doesn't have a mode like Linux
CLI Example:
salt '*' file.get_mode /etc/passwd
Return the id of the user that owns a given file
CLI Example:
salt '*' file.get_uid c:\temp\test.txt
Return the user that owns a given file
CLI Example:
salt '*' file.get_user c:\temp\test.txt
Convert the group id to the group name on this system
CLI Example:
salt '*' file.gid_to_group S-1-5-21-626487655-2533044672-482107328-1010
Convert the group to the gid on this system
CLI Example:
salt '*' file.group_to_gid administrators
Return a dict containing the stats for a given file
CLI Example:
salt '*' file.stats /etc/passwd
Convert a uid to a user name
CLI Example:
salt '*' file.uid_to_user S-1-5-21-626487655-2533044672-482107328-1010
Convert user name to a uid
CLI Example:
salt '*' file.user_to_uid myusername