shepherd: Ensure the log file has correct ownership.
* gnu/build/shepherd.scm (make-forkexec-constructor/container): Ensure LOG-FILE has correct ownership.
This commit is contained in:
parent
0d3a4fc867
commit
464caf72f9
|
@ -150,7 +150,10 @@ namespace, in addition to essential bind-mounts such /proc."
|
|||
(when log-file
|
||||
;; Create LOG-FILE so we can map it in the container.
|
||||
(unless (file-exists? log-file)
|
||||
(call-with-output-file log-file (const #t))))
|
||||
(call-with-output-file log-file (const #t))
|
||||
(when user
|
||||
(let ((pw (getpwnam user)))
|
||||
(chown log-file (passwd:uid pw) (passwd:gid pw))))))
|
||||
|
||||
(let ((pid (run-container container-directory
|
||||
mounts namespaces 1
|
||||
|
|
Loading…
Reference in New Issue