acl

package
v0.0.0-...-440f51e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(name string, owner *windows.SID, group *windows.SID, fileMode os.FileMode) error

Apply performs both Chmod and Chown at the same time, where the filemode's owner and group will correspond to the provided owner and group (or the current owner and group, if they are set to nil)

func ApplyCustom

func ApplyCustom(name string, owner *windows.SID, group *windows.SID, explicitAccess ...windows.EXPLICIT_ACCESS) error

ApplyCustom performs a Chmod (if owner and group are provided) and sets a custom ACL based on the provided EXPLICIT_ACCESS rules To create EXPLICIT_ACCESS rules, see the helper functions in pkg/access

func Chmod

func Chmod(name string, fileMode os.FileMode) error

Chmod changes the file's ACL to match the provided unix permissions. It uses the file's current owner and group to set the ACL permissions.

func Chown

func Chown(name string, owner *windows.SID, group *windows.SID) error

Chown changes the owner and group of the file / directory and applies a default ACL that provides Owner: read, write, execute Group: read, execute Everyone: read, execute

To set custom permissions, use Apply or ApplyCustom instead directly

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL