From 66bc2866611cc396ab1a611ca7e2d451d2b2d3c1 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Sat, 30 May 2020 07:32:10 +0200 Subject: [PATCH] Support for chown in copy step. --- focker/steps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/focker/steps.py b/focker/steps.py index dfc53dc..37ff862 100644 --- a/focker/steps.py +++ b/focker/steps.py @@ -65,6 +65,9 @@ class CopyStep(object): os.path.join(path, target)) if 'chmod' in options: os.chmod(os.path.join(path, target), options['chmod']) + if 'chown' in options: + uid, gid = options['chown'].split(':').map(int) + os.chown(os.path.join(path, target), uid, gid) def create_step(spec):