diff options
author | gandalfs_cat <meow@kittcat.dev> | 2024-06-23 04:28:30 -0700 |
---|---|---|
committer | Bernd Schubert <bernd.schubert@fastmail.fm> | 2024-07-03 12:50:06 +0200 |
commit | 54b8cd6757ed383c0da10a5ba6a778dd45f28ad6 (patch) | |
tree | 04a238edd22081fc047baf83022a51de01d1a5aa /include/fuse.h | |
parent | f88e08f34d2d4f398f23797707e1c50cd306e405 (diff) | |
download | libfuse-54b8cd6757ed383c0da10a5ba6a778dd45f28ad6.tar.gz |
high-level: add fmask and dmask options
dmask: umask applied to directories
fmask: umask applied to non-directories
to get "typical" permission bits for regular files (0644) and directories (0755), a single
umask option is not sufficient (or well, it isn't the way fuse implements it)
there is precident for separate umask and dmask options in other
filesystems (see for example fat: https://github.com/torvalds/linux/tree/master/fs/fat)
this addition should not affect backward-compatibility; the original
umask option retains the same meaning, but non-zero fmask or
dmask will override it.
Diffstat (limited to 'include/fuse.h')
-rw-r--r-- | include/fuse.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/fuse.h b/include/fuse.h index a3549cb..ad50d7f 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -298,6 +298,14 @@ struct fuse_config { int show_help; char *modules; int debug; + + /** + * `fmask` and `dmask` function the same way as `umask`, but apply + * to files and directories separately. If non-zero, `fmask` and + * `dmask` take precedence over the `umask` setting. + */ + unsigned int fmask; + unsigned int dmask; }; |