Commit 4d24912f authored by Levin Zimmermann's avatar Levin Zimmermann

wcfs: Add 'allowother' flag to improve support for multi-user deployments

By default, FUSE prohibits file access [1] by users other than the one
that mounted the file system. This is a security feature. In order to
use WCFS in multi-user deployments, where other users need to access WCFS,
we therefore need to explicitly set the 'allow_other' FUSE option. This
patch allows setting this option with a new WCFS flag. Besides setting
the flag, it's necessary to add 'user_allow_other' to '/etc/fuse.conf'.
Otherwise the flag is effectless.

[1] See 'allow_other' option at
    https://www.kernel.org/doc/html/latest/filesystems/fuse.html
parent db6fea3d
......@@ -2732,6 +2732,7 @@ func _main() (err error) {
debug := flag.Bool("d", false, "debug")
autoexit := flag.Bool("autoexit", false, "automatically stop service when there is no client activity")
pintimeout := flag.Duration("pintimeout", 30*time.Second, "clients are killed if they do not handle pin notification in pintimeout time")
allowOther := flag.Bool("allowother", false, "allow other users to access wcfs")
flag.Parse()
if len(flag.Args()) != 2 {
......@@ -2838,6 +2839,12 @@ func _main() (err error) {
DisableXAttrs: true, // we don't use
Debug: *debug,
// If set to true, other users can access WCFS (if "user_allow_other"
// has been added to /etc/fuse.conf). This can be useful for multi-user
// deployments where WCFS clients are called by other users than user which
// started WCFS.
AllowOther: *allowOther,
}
fssrv, fsconn, err := mount(mntpt, root, opts)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment