Skip to main content

check_secret_permissions

Function check_secret_permissions 

Source
pub fn check_secret_permissions(
    path: &Path,
) -> Result<Option<PermissionWarning>>
Expand description

Checks a secret file’s permissions, on Unix.

Ok(None) means the file is 0600 or tighter. Ok(Some(_)) names what was found. Err is a filesystem problem reading the metadata at all — distinct from a loose permission, and left for the caller to decide whether a missing file is itself fatal.