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.

26 lines
1.2 KiB

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