Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
So I was wondering why setgid directories weren't working properly during provisioning. I realized just now that it's because provision is calling chgrp.
POSIX mandates that the S_ISUID and S_ISGID bits are cleared when a file's ownership is changed by a non-root user.
While it doesn't state that that applies to directories as well, many operating systems appear to not make a distinction here.
So, the chmod has to happen AFTER the chgrp.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2955675_chmod_after_chgrp_2.patch | 1.3 KB | bdragon |
#2 | 2955675_chmod_after_chgrp.patch | 1.26 KB | bdragon |
Comments
Comment #2
bdragon CreditAttribution: bdragon at Tag1 Consulting for Advisor Websites commentedInitial stab at this (patch not tested yet.)
Comment #3
bdragon CreditAttribution: bdragon at Tag1 Consulting for Advisor Websites commentedMissed the conditional.
Comment #4
colanAssuming ready for review.
Comment #6
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedcommitted, thanks.