Documentation
¶
Index ¶
Constants ¶
View Source
const ( DirPerm os.FileMode = 0700 FilePerm os.FileMode = 0600 )
Variables ¶
This section is empty.
Functions ¶
func SecureDir ¶
SecureDir creates dir (and any parents) if needed and sets it to owner-only access (DirPerm, 0700). The Chmod also applies to a pre-existing directory, remediating installs created with looser permissions.
func SecureFile ¶
SecureFile sets an existing file to owner-only read/write (FilePerm, 0600). It is a no-op if the file does not exist yet, so callers may invoke it defensively on optional files.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.