• Kubernetes Submit Queue's avatar
    Merge pull request #37009 from sjenning/fix-perms-with-fsgroup · 0f2c6fc7
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 38294, 37009, 36778, 38130, 37835)
    
    fix permissions when using fsGroup
    
    Currently, when an fsGroup is specified, the permissions of the defaultMode are not respected and all files created by the atomic writer have mode 777.  This is because in `SetVolumeOwnership()` the `filepath.Walk` includes the symlinks created by the atomic writer.  The symlinks have mode 777 when read from `info.Mode()`.  However, when the are chmod'ed later, the chmod applies to the file the symlink points to, not the symlink itself, resulting in the wrong mode for the underlying file.
    
    This PR skips chmod/chown for symlinks in the walk since those operations are carried out on the underlying file which will be included elsewhere in the walk.
    
    xref https://bugzilla.redhat.com/show_bug.cgi?id=1384458
    
    @derekwaynecarr @pmorie
    0f2c6fc7
Name
Last commit
Last update
..
e2e Loading commit data...
e2e_node Loading commit data...
fixtures Loading commit data...
images Loading commit data...
integration Loading commit data...
kubemark Loading commit data...
list Loading commit data...
soak Loading commit data...
utils Loading commit data...
OWNERS Loading commit data...
test_owners.csv Loading commit data...