Installations: don't set group permissions when they match what is desired (#38036)
* When installing a package Spack will attempt to set group permissions on the install prefix even when the configuration does not specify a group. Co-authored-by: David Gomez <dvdgomez@users.noreply.github.com>
This commit is contained in:
@@ -610,6 +610,8 @@ def chgrp(path, group, follow_symlinks=True):
|
||||
gid = grp.getgrnam(group).gr_gid
|
||||
else:
|
||||
gid = group
|
||||
if os.stat(path).st_gid == gid:
|
||||
return
|
||||
if follow_symlinks:
|
||||
os.chown(path, -1, gid)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user