Skip to content

Commit

Permalink
Add WinFSP help
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Jun 9, 2023
1 parent 1832fd4 commit d3d4dac
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
`
Expand Down
6 changes: 6 additions & 0 deletions internal/goofys_fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions internal/goofys_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d3d4dac

Please sign in to comment.