From b4466bd9b1f59ac00c3f4637c8949c1b6eafa31c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 9 May 2017 14:03:37 +0100 Subject: [PATCH] Add -o uid=-1 -o gid=-1 for Windows/WinFsp --- cmd/cmount/mount.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 906724b75..61fc2dc02 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -179,6 +179,13 @@ func mountOptions(device string, mountpoint string) (options []string) { options = append(options, "-o", "noapplexattr") } + // Windows options + if runtime.GOOS == "windows" { + // These cause WinFsp to mean the current user + options = append(options, "-o", "uid=-1") + options = append(options, "-o", "gid=-1") + } + if allowNonEmpty { options = append(options, "-o", "nonempty") }