# JupyterHub error while editing - Error "Permission denied: untitled.py"

**URL:** <https://discourse.jupyter.org/t/jupyterhub-error-while-editing-error-permission-denied-untitled-py/29339>\
**Category:** JupyterHub\
**Tags:** community, jupyterhub, help-wanted, notebook\
**Created:** [October 18, 2024, 6:41am UTC](https://discourse.jupyter.org/t/jupyterhub-error-while-editing-error-permission-denied-untitled-py/29339 "2024-10-18T06:41:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Najafov007](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/najafov007/32/15399_2.png) [@Najafov007](https://discourse.jupyter.org/u/Najafov007)\
**Post date:** [October 18, 2024, 6:41am UTC](https://discourse.jupyter.org/t/jupyterhub-error-while-editing-error-permission-denied-untitled-py/29339/1 "2024-10-18T06:41:16Z")

</div>

Hello everyone. I recently had a problem with integrating JH with Keycloak using Helm chart. It’s been solved, thank you for that. The problem now is - after the login from keycloak, sends us back to jupyterhub with the notebook, but seem like we cannot do anything on this playbook, cant create, delete or anythin. Even though I am admin. How can we solve this problem?

Here’s my config

```auto
auxiliaryImage:
  registry: <our-harbor>
global:
  imagePullSecrets:
    - <our-harbor-secret>
hub:
  adminUser: admin@admin.com
  configuration: |
    hub:
      config:
        GenericOAuthenticator:
          client_id: jupyter
          client_secret: <client-secret>
          oauth_callback_url: <url>
          authorize_url: <auth_url>
          token_url: <token_url>
          userdata_url: <userinfo_url>
          logout_redirect_url: <logout_url>
          redirect_uri=<redirect_url>
          login_service: keycloak
          username_key: preferred_username
          userdata_params:
            state: state
          scope:
            - openid
            - acr
            - address
            - basic
            - email
            - microprofile-jwt
            - phone
            - profile
          admin_users:
            - admin@admin.com
        JupyterHub:
          authenticator_class: generic-oauth
      cookieSecret: <secret>
      concurrentSpawnLimit: 64
      consecutiveFailureLimit: 5
      activeServerLimit:
    cull:
      enabled: true
      users: false
      removeNamedServers: false
      timeout: 14400
      every: 600
      concurrency: 10
      maxAge: 0
  extraEnv:
    OAUTH2_AUTHORIZE_URL: >-
      <oauth_url>
    OAUTH2_TOKEN_URL: >-
      <token_url>
    OAUTH_CALLBACK_URL: '<call_back_url>'
  image:
    registry: <harbor>
    repository: <image>
    tag: v1
  networkPolicy:
    enabled: false
  password: admin
  serviceAccount:
    create: true
    name: jupyter-hub-sa
imagePuller:
  enabled: false
postgresql:
  primary:
    containerSecurityContext:
      enabled: false
    podSecurityContext:
      enabled: false
proxy:
  containerSecurityContext:
    enabled: false
  image:
    registry: <image>
  networkPolicy:
    enabled: false
  podSecurityContext:
    enabled: false
  service:
    api:
      public:
        type: ClusterIP
  serviceAccount:
    create: true
    name: jupyter-proxy-sa
singleuser:
  containerSecurityContext:
    enabled: false
    runAsGroup: 1000810000
    runAsUser: 1000810000
  extraEnvVars:
    SPARK_CONF_DIR: /data/confs/
  extraVolumeMounts:
    - mountPath: /data/confs
      name: singleuser-custom-confs
      readOnly: true
  extraVolumes:
    - name: singleuser-custom-confs
      secret:
        secretName: jh-singleuser-custom-confs
  image:
    registry: <harbor>
  networkPolicy:
    enabled: false
  persistence:
    enabled: true
    size: 20Gi
  podSecurityContext:
    enabled: false
    fsGroup: 1000810000
  profileList:
    - description: Relatively small image packaged by Bitnami
      display_name: Minimal notebook image
      kubespawner_override:
        image: '<image>'
        pod_anti_affinity_preferred:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: jupyterhub
            weight: 100
    - description: 'Extended with scipy, matplotlib packages'
      display_name: Jupyter Data Science notebook image
      kubespawner_override:
        image: '<image>'
        pod_anti_affinity_preferred:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: jupyterhub
            weight: 100
    - default: true
      description: >-
        Included packages: matplotlib, numpy, pandas, seaborn, scikit-learn,
        pyspark, feast
      display_name: Jupyter Data Science notebook image with preinstalled core packages
      kubespawner_override:
        image: '<image>'
        pod_anti_affinity_preferred:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: jupyterhub
            weight: 100
    - description: Python 3.11 included
      display_name: >-
        NEW - Jupyter Data Science notebook image with preinstalled core
        packages
      kubespawner_override:
        image: '<image>'
        pod_anti_affinity_preferred:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: jupyterhub
            weight: 100
  resources:
    limits:
      cpu: '2'
      memory: 5Gi
    requests:
      cpu: '1'
      memory: 3Gi
  serviceAccount:
    create: true
    name: jupyter-singleuser-sa

```

EVerything goes as it’s supposed to be, login to key, back to JH, pick one image-notebook and create. But cannot write, could you please help?

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [October 18, 2024, 2:19pm UTC](https://discourse.jupyter.org/t/jupyterhub-error-while-editing-error-permission-denied-untitled-py/29339/2 "2024-10-18T14:19:44Z")

</div>

It sounds like your singleuser server doesn’t have permission to write to the dynamic storage volume created for each user. Try setting  
[`singleuser.fsGid`](https://z2jh.jupyter.org/en/stable/resources/reference.html#singleuser-fsgid)
