From b9755f88404c5c4ed7f68173daf398afac932191 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Jacke?= Date: Tue, 15 Oct 2024 11:43:58 +0200 Subject: [PATCH] samba-tool/backup: set the right permissions on our root dir MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since processes can run under the UID of the logged in user, it's required to make sure that the users have the permissions here. Signed-off-by: Bjoern Jacke Reviewed-by: Björn Baumbach Autobuild-User(master): Björn Baumbach Autobuild-Date(master): Tue Dec 10 11:40:27 UTC 2024 on atb-devel-224 --- python/samba/netcmd/domain/backup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/samba/netcmd/domain/backup.py b/python/samba/netcmd/domain/backup.py index b1b57c04a7f..a72c6daaded 100644 --- a/python/samba/netcmd/domain/backup.py +++ b/python/samba/netcmd/domain/backup.py @@ -500,6 +500,8 @@ class cmd_domain_backup_restore(cmd_fsmo_seize): tf = tarfile.open(backup_file) tf.extractall(targetdir) tf.close() + # set the permissions on the target dir strict but also relaxed enough + os.chmod(targetdir, mode=0o755) # use the smb.conf that got backed up, by default (save what was # actually backed up, before we mess with it) -- 2.47.3