diff --git a/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml index c3ed01849..3dde576d0 100644 --- a/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml +++ b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml @@ -9,3 +9,4 @@ metadata: spec: attachRequired: false podInfoOnMount: false + fsGroupPolicy: File diff --git a/deploy/cephfs/kubernetes/csidriver.yaml b/deploy/cephfs/kubernetes/csidriver.yaml index d347ff843..fdd17ca7f 100644 --- a/deploy/cephfs/kubernetes/csidriver.yaml +++ b/deploy/cephfs/kubernetes/csidriver.yaml @@ -8,3 +8,4 @@ metadata: spec: attachRequired: false podInfoOnMount: false + fsGroupPolicy: File diff --git a/internal/cephfs/core/volume.go b/internal/cephfs/core/volume.go index 35cd4c809..3c1d9b784 100644 --- a/internal/cephfs/core/volume.go +++ b/internal/cephfs/core/volume.go @@ -39,12 +39,6 @@ import ( // taken through this additional cluster information. var clusterAdditionalInfo = make(map[string]*localClusterState) -const ( - // modeAllRWX can be used for setting permissions to Read-Write-eXecute - // for User, Group and Other. - modeAllRWX = 0o777 -) - // Subvolume holds subvolume information. This includes only the needed members // from fsAdmin.SubVolumeInfo. type Subvolume struct { @@ -231,7 +225,6 @@ func (s *subVolumeClient) CreateVolume(ctx context.Context) error { opts := fsAdmin.SubVolumeOptions{ Size: fsAdmin.ByteCount(s.Size), - Mode: modeAllRWX, } if s.Pool != "" { opts.PoolLayout = s.Pool