fix(service): drop the s6 chmod-after-chown reorder
s6 only runs on Linux as root inside s6-overlay, and Linux chown() never clears the setgid bit on directories (only on non-directory files), so the reorder fixed nothing reachable and its comment overstated the effect. Back to origin/main's order.
This commit is contained in:
@@ -342,8 +342,8 @@ def _seed_supervise_skeleton(svc_dir: Path) -> None:
|
||||
if path.exists():
|
||||
return
|
||||
path.mkdir(parents=False, exist_ok=False)
|
||||
path.chmod(mode)
|
||||
_chown_hermes(path)
|
||||
path.chmod(mode) # after chown: POSIX lets chown() clear the setgid bit event/ relies on
|
||||
|
||||
def _seed(root: Path) -> None:
|
||||
# Service-root event/ is the s6-svlisten1 subscription dir, distinct from supervise/event/.
|
||||
@@ -357,8 +357,8 @@ def _seed_supervise_skeleton(svc_dir: Path) -> None:
|
||||
control = supervise / "control"
|
||||
if not control.exists():
|
||||
os.mkfifo(control, 0o660)
|
||||
_chown_hermes(control)
|
||||
control.chmod(0o660)
|
||||
_chown_hermes(control)
|
||||
|
||||
_seed(svc_dir)
|
||||
log_dir = svc_dir / "log"
|
||||
|
||||
Reference in New Issue
Block a user