Skip to content

Version 1.17.0

Compare
Choose a tag to compare
@marjune163 marjune163 released this 06 Mar 13:41
· 49 commits to main since this release

Main Changes

Authorize path access for specified users

added --auth-user and --auth-dir-user to restrict path access authentication to specified user.

  • --auth-user <separator><url-path>[<separator><allowed-username>...] ...
  • --auth-dir-user <separator><fs-path>[<separator><allowed-username>...] ...

example:

ghfs -r /usr --user user1:pass1 user2:pass2 user3:pass3 --auth-user :/share:user1 --auth-user :/bin:user2:user3

Grant mutate permission to specified user

It's nature that for a specified directory, administrator may have upload/mkdir/delete permissions, while other users or guests are read only.
Added several options to enable mutation for specified user:

  • --upload-user <separator><url-path>[<separator><allowed-username>...] ...
  • --upload-dir-user <separator><fs-path>[<separator><allowed-username>...] ...
  • --mkdir-user <separator><url-path>[<separator><allowed-username>...] ...
  • --mkdir-dir-user <separator><fs-path>[<separator><allowed-username>...] ...
  • -delete-user <separator><url-path>[<separator><allowed-username>...] ...
  • --delete-dir-user <separator><fs-path>[<separator><allowed-username>...] ...

example:

ghfs -r /data --user admin:adminpass --upload-user :/:admin --mkdir-user :/:admin --delete-user :/:admin

主要变更

授权特定用户访问目录

添加了--auth-user--auth-dir-user用于限定访问认证的用户。

  • --auth-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --auth-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...

举例:

ghfs -r /usr --user user1:pass1 user2:pass2 user3:pass3 --auth-user :/share:user1 --auth-user :/bin:user2:user3

为指定用户授予变更权限

有个很常见的需求是对于某个目录,管理员有上传、建目录、删除权限,而普通用户或访客只有只读权限。
添加了多个选项来启用指定用户的更改权限:

  • --upload-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --upload-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...
  • --mkdir-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --mkdir-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...
  • --delete-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --delete-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...

举例:

ghfs -r /data --user admin:adminpass --upload-user :/:admin --mkdir-user :/:admin --delete-user :/:admin