Always mount with current user and read-only perms. (#363)

This commit is contained in:
Manuel Riel 2019-10-10 11:59:37 +08:00 committed by GitHub
parent af7cc3dd2b
commit a991440b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import os
from .borg_thread import BorgThread
@ -14,8 +15,7 @@ class BorgMountThread(BorgThread):
else:
ret['ok'] = False # Set back to false, so we can do our own checks here.
cmd = ['borg', 'mount', '--log-json']
cmd.append(f'{profile.repo.url}')
cmd = ['borg', '--log-json', 'mount', '-o', f"umask=0277,uid={os.getuid()}", f"{profile.repo.url}"]
ret['ok'] = True
ret['cmd'] = cmd