services: cleanup: Reintroduce explicit ‘chmod’ calls.

This reverts commit e74d05db53.

* gnu/services.scm (cleanup-gexp): Introduce explicit ‘chmod’ calls
after ‘mkdir’ calls.
* gnu/tests/base.scm (run-basic-test)[test]("permissions on /tmp"):
New test.

Reported-by: Hilton Chain <hako@ultrarare.space>
Change-Id: I1e14dbe52eac526d2ed4ec1dd9c6fd9036f96a63
This commit is contained in:
Ludovic Courtès 2024-09-25 16:30:09 +02:00
parent a1dc5ac832
commit f92151133d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 10 additions and 1 deletions

View file

@ -665,9 +665,14 @@ information is missing, return the empty list (for channels) and possibly
(delete-file-recursively "/var/run")
(delete-file-recursively "/run")
;; Note: The second argument to 'mkdir' is and'ed with umask,
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
(mkdir "/var/run" #o755)
(mkdir "/run" #o755))))))
(chmod "/var/run" #o755)
(mkdir "/run" #o755)
(chmod "/var/run" #o755))))))
(define cleanup-service-type
;; Service that cleans things up in /tmp and similar.