Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uid/gid modification to match hosts uid/gid #1401

Closed
wants to merge 1 commit into from

Conversation

edgd1er
Copy link
Contributor

@edgd1er edgd1er commented Jul 26, 2023

When using mounted volumes, container uid/gid have to match hosts uid/gid in order to have rights on the files.

Description

set pihole uid/gid according to env values PIHOLE_UID/PIHOLE_GID

this feature was already present in previous pihole versions.

Motivation and Context

docker-pi-hole-pihole-1 | 2023-07-26 08:07:12.945 [177M] WARNING: chmod(/etc/pihole/pihole-FTL.db, 436): chmod() failed: Operation not permitted

How Has This Been Tested?

When setting uid/gid, no more warning are displayed in the container logs.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@sonarcloud
Copy link

sonarcloud bot commented Jul 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@PromoFaux
Copy link
Member

Sorry, I actually already had this done, just forgot to push and PR (now here: #1403)

Similar change, but I would rather it was just in start.sh - no need for a reusable function

@PromoFaux PromoFaux closed this Jul 26, 2023
@edgd1er edgd1er deleted the uid_gid branch July 26, 2023 16:45
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.

2 participants