permissionutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// User Read Write Execute Permission
	UserRead             = os_read << os_user_shift
	UserWrite            = os_write << os_user_shift
	UserExecute          = os_ex << os_user_shift
	UserReadWrite        = UserRead | UserWrite
	UserReadWriteExecute = UserReadWrite | UserExecute

	// Group Read Write Execute Permission
	GroupRead             = os_read << os_group_shift
	GroupWrite            = os_write << os_group_shift
	GroupExecute          = os_ex << os_group_shift
	GroupReadWrite        = GroupRead | GroupWrite
	GroupReadWriteExecute = GroupReadWrite | GroupExecute

	// Other Read Write Execute Permission
	OtherRead             = os_read << os_other_shift
	OtherWrite            = os_write << os_other_shift
	OtherExecute          = os_ex << os_other_shift
	OtherReadWrite        = OtherRead | OtherWrite
	OtherReadWriteExecute = OtherReadWrite | OtherExecute

	// All Read Write Execute Permission
	AllRead             = UserRead | GroupRead | OtherRead
	AllWrite            = UserWrite | GroupWrite | OtherWrite
	AllExecute          = UserExecute | GroupExecute | OtherExecute
	AllReadWrite        = AllRead | AllWrite
	AllReadWriteExecute = AllReadWrite | AllExecute
)

Variables

View Source
var (
	IsRoot       bool
	HasCapNetRaw bool
)
View Source
var ErrNotImplemented = errors.New("not implemented")

Functions

func UpdateFilePerm

func UpdateFilePerm(filename string, perm int) error

UpdateFilePerm modifies the permissions of the given file. Returns an error if the file permissions could not be updated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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