diff options
| -rw-r--r-- | gnu/build/shepherd.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index 461feb06ef1..14bdf4edb84 100644 --- a/gnu/build/shepherd.scm +++ b/gnu/build/shepherd.scm | |||
| @@ -150,7 +150,10 @@ namespace, in addition to essential bind-mounts such /proc." | |||
| 150 | (when log-file | 150 | (when log-file |
| 151 | ;; Create LOG-FILE so we can map it in the container. | 151 | ;; Create LOG-FILE so we can map it in the container. |
| 152 | (unless (file-exists? log-file) | 152 | (unless (file-exists? log-file) |
| 153 | (call-with-output-file log-file (const #t)))) | 153 | (call-with-output-file log-file (const #t)) |
| 154 | (when user | ||
| 155 | (let ((pw (getpwnam user))) | ||
| 156 | (chown log-file (passwd:uid pw) (passwd:gid pw)))))) | ||
| 154 | 157 | ||
| 155 | (let ((pid (run-container container-directory | 158 | (let ((pid (run-container container-directory |
| 156 | mounts namespaces 1 | 159 | mounts namespaces 1 |
