You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
1004 B

  1. # nfsopenhack
  2. NFS is not fully POSIX compliant and historically certain behaviors,
  3. such as opening files with O_EXCL, are not or not well supported. When
  4. mergerfs (or any FUSE filesystem) is exported over NFS some of these
  5. issues come up due to how NFS and FUSE interact.
  6. This hack addresses the issue where the creation of a file with a
  7. read-only mode but with a read/write or write only flag. Normally this
  8. is perfectly valid but NFS chops the one open call into multiple
  9. calls. Exactly how it is translated depends on the configuration and
  10. versions of the NFS server and clients but it results in a permission
  11. error because a normal user is not allowed to open a read-only file as
  12. writable.
  13. Even though it's a more niche situation this hack breaks normal
  14. security and behavior and as such is `off` by default. If set to `git`
  15. it will only perform the hack when the path in question includes
  16. `/.git/`. `all` will result in it applying anytime a read-only file
  17. which is empty is opened for writing.