Switch using Linux "default_permissions" to an optional parameter. (#94)

There's no reason for this to be enforced on the user. For use-cases such as S3-backing, there are no "permissions" of such to base this on. Consequently, everything ends up being owned as root and making it far more difficult to use.

It should, however, be optional.
geesefs-0-30-9
Elliot Speck 2020-12-17 02:55:45 +11:00 committed by GitHub
parent 36e01f1b3a
commit e0296dec95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -151,6 +151,11 @@ type MountConfig struct {
// OpenDir calls at all (Linux >= 5.1):
EnableNoOpendirSupport bool
// Disable FUSE default permissions.
// This is useful for situations where the backing data store (e.g., S3) doesn't
// actually utilise any form of qualifiable UNIX permissions.
DisableDefaultPermissions bool
// OS X only.
//
// The name of the mounted volume, as displayed in the Finder. If empty, a
@ -179,7 +184,9 @@ func (c *MountConfig) toMap() (opts map[string]string) {
// Enable permissions checking in the kernel. See the comments on
// InodeAttributes.Mode.
opts["default_permissions"] = ""
if !c.DisableDefaultPermissions {
opts["default_permissions"] = ""
}
// HACK(jacobsa): Work around what appears to be a bug in systemd v219, as
// shipped in Ubuntu 15.04, where it automatically unmounts any file system