Skip to main content

check-path-access-by-user

Overview

Validates whether a user has read or write access to a specified path.

Command-Line Options

OptionTypeDefaultDescription
--user, -uStringrootUser to check access for
--path, -pString-File or directory path to test
--operation, -oChoicewriteAccess type: read or write
--timeoutInteger300Command execution timeout in seconds
--sinkStringdo_nothingTelemetry sink destination
--sink-optsMultiple-Sink-specific configuration
--verbose-outFlagFalseDisplay detailed output
--log-levelChoiceINFODEBUG, INFO, WARNING, ERROR, CRITICAL
--log-folderString/var/log/fb-monitoringLog directory
--heterogeneous-cluster-v1FlagFalseEnable heterogeneous cluster support

Exit Conditions

Exit CodeCondition
OK (0)Feature flag disabled (killswitch active)
OK (0)User has required access permission
WARN (1)Command execution failed
CRITICAL (2)User lacks required access permission

Usage Examples

# Check if root can write to /tmp
health_checks check-authentication check-path-access-by-user --path /tmp [CLUSTER] app

# Check if user can read a file
health_checks check-authentication check-path-access-by-user \
--user appuser \
--path /var/log/app.log \
--operation read \
[CLUSTER] \
app

# Verify write access to data directory
health_checks check-authentication check-path-access-by-user \
--user datauser \
--path /data/processing \
--operation write \
[CLUSTER] \
app