Skip to content

Fix InfluxDB data directory permission issue after install (#88) - #89

Open
y-vectorfield wants to merge 1 commit into
sunfounder:1.3.xfrom
y-vectorfield:fix_issue#88_influxdb_permission_issue
Open

Fix InfluxDB data directory permission issue after install (#88)#89
y-vectorfield wants to merge 1 commit into
sunfounder:1.3.xfrom
y-vectorfield:fix_issue#88_influxdb_permission_issue

Conversation

@y-vectorfield

Copy link
Copy Markdown

Description

Fixes #88

Problem

On Ubuntu 24.04 fresh installs, pironman5 service can be active, but data logging fails due to InfluxDB shard file permission denied errors under /var/lib/influxdb/data.

Cause

InfluxDB data directory ownership and modes are not normalized during installation in this flow, which can leave runtime write permissions inconsistent.

Changes

  • Add post-install permission normalization for /var/lib/influxdb
  • Set ownership to influxdb:influxdb when the directory exists
  • Normalize directory permissions to 755
  • Normalize file permissions to 644

Why this is safe

  • Runs only when /var/lib/influxdb exists
  • Uses standard InfluxDB ownership and conservative filesystem modes
  • Does not change service startup logic or unrelated installer behavior

Testing

Verified on Ubuntu 24.04.4 LTS:

  • pironman5 service reaches active running state
  • Repeated InfluxDB permission denied shard errors no longer appear
  • Data logger starts normally after service restart

@y-vectorfield

Copy link
Copy Markdown
Author

@cavonlee , please review my PR. If there are not any problems, please approve and merge my modifications.

@y-vectorfield

Copy link
Copy Markdown
Author

@kyuuinochi , please review my PR. If there are not any problems, please approve and merge my modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pironman5 service produces permission denied errors

1 participant