backups: Make plinth the owner of the backup archives

Changing the ownership of the backup archives from "root" to "plinth" fixes the
permission errors when downloading backup archives.

Fixes #1402

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-10-22 15:55:56 +05:30 committed by James Valleroy
parent cf6d0aa938
commit 6be6b847fd
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -24,6 +24,7 @@ import argparse
import glob
import json
import os
import shutil
import subprocess
import sys
import tarfile
@ -140,6 +141,8 @@ def subcommand_export(arguments):
arguments.filename
], check=True)
shutil.chown(arguments.filename, user='plinth', group='plinth')
def subcommand_list_exports(arguments):
"""List exported backup archive files."""