M gnu/services.scm => gnu/services.scm +6 -1
@@ 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.
M gnu/tests/base.scm => gnu/tests/base.scm +4 -0
@@ 296,6 296,10 @@ info --version")
(operating-system-user-accounts os))))
(stat:perms (marionette-eval `(stat ,root-home) marionette))))
+ (test-equal "permissions on /tmp"
+ #o1777
+ (stat:perms (marionette-eval '(lstat "/tmp") marionette)))
+
(test-equal "ownership and permissions of /var/empty"
'(0 0 #o555)
(let ((st (marionette-eval `(stat "/var/empty") marionette)))