Skip to content

Commit d04ff0a

Browse files
authored
fix: mismatched container fs permissions (knative#2946)
1 parent e06397d commit d04ff0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/k8s/security_context.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ func defaultPodSecurityContext() *corev1.PodSecurityContext {
1414
return nil
1515
}
1616
runAsUser := int64(1001)
17-
runAsGroup := int64(1002)
17+
runAsGroup := int64(0) // Match Tekton buildpack task group
18+
fsGroup := int64(1002) // Keep FSGroup for volume ownership
1819
return &corev1.PodSecurityContext{
1920
RunAsUser: &runAsUser,
2021
RunAsGroup: &runAsGroup,
21-
FSGroup: &runAsGroup,
22+
FSGroup: &fsGroup,
2223
}
2324
}
2425

0 commit comments

Comments
 (0)