Documentation ¶
Overview ¶
Package fileperm contains functions to check permissions on files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrWriteable is returned for files that are writeable by somebody other than root and process owner. ErrWriteable = errors.New("other than user can write") // ErrIrregular is returned for files that are not regular files, including symlinks. ErrIrregular = errors.New("not a regular file") // ErrOwner is returned for files that are owned by anybody but root or process owner. ErrOwner = errors.New("not owned by root or process") )
Functions ¶
func PermissionCheck ¶
PermissionCheck verifies that an open file is 1) Regular 2) Not writeable by group/other 3) Owned by root or eUID. Both the file handle and the full path to file are required. The file must have been opened by absolute path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.