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

permission denied: when editing preferences using a longhorn volume #74

Open
jcollas opened this issue Oct 6, 2022 · 2 comments
Open

Comments

@jcollas
Copy link

jcollas commented Oct 6, 2022

Describe the bug
A clear and concise description of what the bug is.

Saving preferences when configured against a default longhorn (https://longhorn.io) volume returns a 'permission denied' error.

This is because by default the mounted pvc is root, and the container permissions are 'hajimari' (uid: 100, gid: 101). I've fixed this by adding this to the deployment securityContext:

securityContext:
fsGroup: 101
fsGroupChangePolicy: "OnRootMismatch"

You might want to considering adding something like this to the helm chart for the future.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@rust84
Copy link

rust84 commented Oct 7, 2022

Same issue using rook. Will try the fix suggested, thanks.

tyriis added a commit to tyriis/home-ops that referenced this issue Oct 15, 2022
@jsvensson
Copy link

Just another data point for this issue -- I'm using a Helm chart in Terraform, so these are the equivalent modified settings:

resource "helm_release" "hajimari" {
  repository = "https://hajimari.io"
  chart      = "hajimari"

  # rest of the chart setup omitted

  set {
    name  = "podSecurityContext.fsGroup"
    value = 101
  }
  set {
    name  = "podSecurityContext.fsGroupChangePolicy"
    value = "OnRootMismatch"
  }
}

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

No branches or pull requests

3 participants