fsperm

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

View Source
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

func EnsurePrivateDir(dir string) error

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.

Jump to

Keyboard shortcuts

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