File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
components/ws-daemon/pkg/iws Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -757,6 +757,23 @@ func (wbs *InWorkspaceServiceServer) MountNfs(ctx context.Context, req *api.Moun
757
757
return nil , xerrors .Errorf ("cannot mount nfs: %w" , err )
758
758
}
759
759
760
+ stat , err := os .Stat (nodeStaging )
761
+ if err != nil {
762
+ return nil , xerrors .Errorf ("cannot stat staging: %w" , err )
763
+ }
764
+
765
+ sys , ok := stat .Sys ().(* syscall.Stat_t )
766
+ if ! ok {
767
+ return nil , xerrors .Errorf ("cast to stat failed" )
768
+ }
769
+
770
+ if sys .Uid != 133332 || sys .Gid != 133332 {
771
+ err = os .Chown (nodeStaging , 133332 , 133332 )
772
+ if err != nil {
773
+ return nil , xerrors .Errorf ("cannot chown %s for %s" , nodeStaging , req .Source )
774
+ }
775
+ }
776
+
760
777
err = moveMount (wbs .Session .InstanceID , int (nfsPID ), nodeStaging , req .Target )
761
778
if err != nil {
762
779
return nil , err
You can’t perform that action at this time.
0 commit comments