diff --git a/resources/lib/modules/system.py b/resources/lib/modules/system.py index f46001eba..292c7fedd 100644 --- a/resources/lib/modules/system.py +++ b/resources/lib/modules/system.py @@ -624,6 +624,13 @@ def do_send_logs(self, log_cmd): def tar_add_folder(self, tar, folder): try: print_folder = log.asciify(folder) + try: + fsr = os.lstat(folder) + except: + pass + else: + if fsr.st_mode != 0o40755 or fsr.st_uid or fsr.st_gid: + tar.add(folder, recursive=False) for item in os.listdir(folder): if item == self.backup_file: continue