From d3d4daccf0ac52c72e003fb29028e1a5ba82a79c Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 8 Jun 2023 16:12:52 +0300 Subject: [PATCH] Add WinFSP help --- internal/flags.go | 4 ++-- internal/goofys_fuse.go | 6 ++++++ internal/goofys_windows.go | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/internal/flags.go b/internal/flags.go index f3646d7c..fb6cc037 100644 --- a/internal/flags.go +++ b/internal/flags.go @@ -72,8 +72,8 @@ S3 OPTIONS: {{end}} MISC OPTIONS: {{range category .Flags "misc"}}{{.}} - {{end}}{{end}}{{if .Copyright }} -COPYRIGHT: + {{end}}{{end}} +`+fuseOptions+`{{if .Copyright }}COPYRIGHT: {{.Copyright}} {{end}} ` diff --git a/internal/goofys_fuse.go b/internal/goofys_fuse.go index 3b476f53..db246780 100644 --- a/internal/goofys_fuse.go +++ b/internal/goofys_fuse.go @@ -37,6 +37,12 @@ import ( // jacobsa/fuse interface to the file system +const fuseOptions = `FUSE OPTIONS: + -o allow_other allow all users (including root) to access files + -o allow_root allow root and filesystem owner to access files + -o rootmode=M set file mode of the filesystem's root (octal) +`; + type GoofysFuse struct { fuseutil.NotImplementedFileSystem *Goofys diff --git a/internal/goofys_windows.go b/internal/goofys_windows.go index f2e138e6..d39aee93 100644 --- a/internal/goofys_windows.go +++ b/internal/goofys_windows.go @@ -32,6 +32,32 @@ import ( // winfsp/cgofuse interface to the file system +const fuseOptions = `WinFSP options: + -o umask=MASK set file permissions (octal) + -o FileSecurity=SDDL set file DACL (SDDL format) + -o create_umask=MASK set newly created file permissions (octal) + -o create_file_umask=MASK for files only + -o create_dir_umask=MASK for directories only + -o uid=N set file owner (default is mounting user id) + -o gid=N set file group (default is mounting user group) + -o rellinks interpret absolute symlinks as volume relative + -o dothidden dot files have the Windows hidden file attrib + -o volname=NAME set volume label + -o VolumePrefix=UNC set UNC prefix (/Server/Share) + -o FileSystemName=NAME set file system name (use NTFS to run executables) + -o debug enable debug output + -o DebugLog=FILE debug log file (requires -o debug) +WinFSP advanced options: + -o FileInfoTimeout=N metadata timeout (millis, -1 for data caching) + -o DirInfoTimeout=N directory info timeout (millis) + -o EaTimeout=N extended attribute timeout (millis) + -o VolumeInfoTimeout=N volume info timeout (millis) + -o KeepFileCache do not discard cache when files are closed + -o LegacyUnlinkRename do not support new POSIX unlink/rename + -o ThreadCount number of file system dispatcher threads + -o uidmap=UID:SID[;...] explicit UID <-> SID map (max 8 entries) +`; + type GoofysWin struct { fuse.FileSystemBase *Goofys