Documentation
¶
Overview ¶
Package fsperm is the single owner of private-directory creation. Config and store both need 0700 data dirs; older 0755 installs are tightened, owner-locked (0555) dirs are not silently unlocked.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrChmod = errors.New("chmod")
ErrChmod means the directory exists but chmod 0700 failed. Callers log the error and continue so unsupported filesystems (and Windows) still work.
Functions ¶
func EnsurePrivateDir ¶
EnsurePrivateDir creates dir at 0700 and tightens an existing owner-writable directory to 0700 so older installs left at 0755 are quietly locked down (migration of H-2). It does not add owner-write: a 0555 (or otherwise owner-locked) directory stays locked.
MkdirAll and Stat failures are returned as-is. A chmod failure is wrapped with ErrChmod so the caller can log it and continue.
Types ¶
This section is empty.