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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bdragon created an issue. See original summary.

bdragon’s picture

Status: Active » Needs work
FileSize
1.26 KB

Initial stab at this (patch not tested yet.)

bdragon’s picture

Missed the conditional.

colan’s picture

Status: Needs work » Needs review

Assuming ready for review.

  • helmo committed 18405d6 on 7.x-3.x authored by bdragon
    Issue #2955675 by bdragon: chgrp during provision strips off setgid...
helmo’s picture

Status: Needs review » Fixed

committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.