Permission denied when overriding sonar.properties

Must-share information (formatted with Markdown):

  • which versions are you using: sonarqube:10.4.1-community
  • how is SonarQube deployed: Using Helm
  • what are you trying to achieve: I want to use postgres DB for sonarqube and I’m trying to override the database information by executing cp command to replace sonar.properties from my configmap but when container start I see the error PostStartHookError: command ‘/bin/bash -c cp /sonarqubeconf/sonar.properties /opt/sonarqube/conf/’ exited with 1: cp: cannot create regular file ‘/opt/sonarqube/conf/sonar.properties’: Permission denied
  • what have you tried so far to achieve this: I go through official document and github project for sonar

Pod configuration is,

  containers:
  - image: sonarqube:10.4.1-community
    imagePullPolicy: Always
    lifecycle:
      postStart:
        exec:
          command:
          - /bin/bash
          - -c
          - cp /sonarqubeconf/sonar.properties /opt/sonarqube/conf/

I found workaround and now mounting volumn directly under path /opt/sonarqube/conf/ so file will available directly.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.