mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-10 09:21:44 -04:00
Merge pull request #9590 from ThomasWaldmann/mount-missing-user-group-1.4
mount: improve error msg when uid/gid cannot be resolved, fixes #9574
This commit is contained in:
commit
9935804819
1 changed files with 4 additions and 2 deletions
|
|
@ -560,8 +560,10 @@ class FuseOperations(llfuse.Operations, FuseBackend):
|
|||
dir_gid = self.gid_forced if self.gid_forced is not None else self.default_gid
|
||||
dir_user = uid2user(dir_uid)
|
||||
dir_group = gid2group(dir_gid)
|
||||
assert isinstance(dir_user, str)
|
||||
assert isinstance(dir_group, str)
|
||||
if not isinstance(dir_user, str):
|
||||
raise Error(f"uid {dir_uid} can not be resolved to a username. Please check that the corresponding user exists or do not specify a uid mount option.")
|
||||
if not isinstance(dir_group, str):
|
||||
raise Error(f"gid {dir_gid} can not be resolved to a group name. Please check that the corresponding group exists or do not specify a gid mount option.")
|
||||
dir_mode = 0o40755 & ~self.umask
|
||||
self.default_dir = Item(mode=dir_mode, mtime=int(time.time() * 1e9),
|
||||
user=dir_user, group=dir_group, uid=dir_uid, gid=dir_gid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue