# Setting up a Shared Workspace for users

**URL:** <https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** jupyterhub, how-to\
**Created:** [July 17, 2025, 6:16pm UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838 "2025-07-17T18:16:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameersk2k](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sameersk2k](https://discourse.jupyter.org/u/sameersk2k)\
**Post date:** [July 17, 2025, 6:16pm UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838/1 "2025-07-17T18:16:54Z")

</div>

I have currently setup a jupyterhub instance on our orgs kubernetes cluster. I have used the chart version 3.3.8 as the kube version was old to support newer ones.  
Currently each user who logs in with org credentials a unique pv is created. But I want to create a shared workspace where multiple people can use. How to do it?

---

<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:** [July 21, 2025, 1:11pm UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838/2 "2025-07-21T13:11:04Z")

</div>

Have a look at

> **[Customizing User Storage](https://z2jh.jupyter.org/en/stable/jupyterhub/customizing/user-storage.html#additional-storage-volumes)**
>
> For the purposes of this guide, we’ll describe “storage” as a “volume” - a location on a disk where a user’s data resides. Kubernetes handles the creation and allocation of persistent volumes, unde...

---

<div class="post-metadata">

**Author:** ![sameersk2k](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sameersk2k](https://discourse.jupyter.org/u/sameersk2k)\
**Post date:** [July 21, 2025, 4:24pm UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838/3 "2025-07-21T16:24:31Z")

</div>

I did it but users can’t create any files inside the /home/shared or /home/jovyan/shared(also tried). the permission are set for root user.

```auto
storage:
    type: dynamic
    extraLabels: {}
    extraVolumes: 
      - name: jupyterhub-shared
        persistentVolumeClaim:
          claimName: jt-shared-workspace-pvc
    extraVolumeMounts:
      - name: jupyterhub-shared
        mountPath: /home/shared
    static:
      pvcName:
      subPath: "{username}"
    capacity: 1Gi # have change to 10Gi later
    homeMountPath: /home/jovyan
    dynamic:
      storageClass: csi-sc-cinder-lagos
      pvcNameTemplate: claim-{username}{servername}
      volumeNameTemplate: volume-{username}{servername}
      storageAccessModes: [ReadWriteOnce]

```

i went into the pod and checked this:  
jovyan@jupyter-shaik-5c-2c-20sameer:~$ ls -ld /home/shared/  
drwxr-xr-x 3 root root 4096 Jul 18 22:30 /home/shared/

---

<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:** [July 21, 2025, 5:38pm UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838/4 "2025-07-21T17:38:38Z")

</div>

You can try setting [`singleuser.fsGid`](https://z2jh.jupyter.org/en/stable/resources/reference.html#singleuser-fsgid) but this requires your storage controller to support this capability- check your storage controller documentation, or ask your K8s admin. Alternatively you could manually create an admin pod and chgrp it?

---

<div class="post-metadata">

**Author:** ![sameersk2k](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sameersk2k](https://discourse.jupyter.org/u/sameersk2k)\
**Post date:** [July 22, 2025, 5:01pm UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838/5 "2025-07-22T17:01:21Z")

</div>

I got that working by doing this in singleuser:

```auto
  initContainers:
    - name: fix-shared-permissions
      image: busybox
      securityContext:
        runAsUser: 0
      volumeMounts:
        - name: jupyterhub-shared
          mountPath: /home/jovyan/shared
      command:
        - sh
        - -c
        - |
          chown -R 1000:100 /home/jovyan/shared && chmod -R u+rwX /home/jovyan/shared

```

---

<div class="post-metadata">

**Author:** ![sameersk2k](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sameersk2k](https://discourse.jupyter.org/u/sameersk2k)\
**Post date:** [July 22, 2025, 5:02pm UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838/6 "2025-07-22T17:02:29Z")

</div>

But the next steps is to mount the ldap group specific shared volumes everytime a user logs in. Do you know anything in that matter.

---

<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:** [July 30, 2025, 11:38am UTC](https://discourse.jupyter.org/t/setting-up-a-shared-workspace-for-users/36838/7 "2025-07-30T11:38:26Z")

</div>

You can try adding a `modify_pod_hook` to mount some custom volumes.

> **[KubeSpawner — Kubespawner](https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html#kubespawner.KubeSpawner.modify_pod_hook)**
