Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不同的文件夹,能够设置不同的用户登录访问吗? #33

Open
wangdemon opened this issue Oct 13, 2023 · 8 comments
Open

Comments

@wangdemon
Copy link

这个文件服务器,性能是真的好。

能不能添加这样一个功能,不同的用户,能访问不同的文件夹?

这么好的程序,作者可以添加一个二维码,毕竟好的程序写起来也容易,我们打赏一点,也是一点心意

@marjune163
Copy link
Collaborator

EHFS 增加了权限设置相关功能,可以参考:
https://github.com/mjpclab/extra-http-file-server/releases/tag/v1.15.11

例如
ehfs -r /home/user/server/ --perms-dir :/home/user/server/private:upload,mkdir,delete:username

@marjune163
Copy link
Collaborator

但好像目前没有添加访问控制的权限 😜

谢谢支持,但考虑到不希望因为接受打赏而受到打赏人的压力以实现某些需求,决定统一不接受打赏。有需求可以提,我会权衡考虑的。

@wangdemon
Copy link
Author

感谢大佬的无私奉献。大佬是业界的一股清流。

@marjune163
Copy link
Collaborator

marjune163 commented Oct 24, 2023

EHFS 下一版会增加access权限,可以这么用:

ehfs -r /data --perms :/user1dir:access,upload,delete:user1 --perms :/user2dir:access,upload,delete:user2

注意:对某个路径指定access权限将导致其不再是公共可访问的。

目前还在研究支持方法。

@marjune163
Copy link
Collaborator

1.17.0增加了--auth-user--auth-dir-user选项用于限定访问认证的用户。详见发布说明:https://github.com/mjpclab/go-http-file-server/releases/tag/v1.17.0

@wangdemon
Copy link
Author

1.17.0增加了--auth-user--auth-dir-user选项用于限定访问认证的用户。详见发布说明:https://github.com/mjpclab/go-http-file-server/releases/tag/v1.17.0

这些的话,如果用户多了,是不是命令有点长,命令行参数长度好像还有限制

@marjune163
Copy link
Collaborator

marjune163 commented Mar 19, 2024

可以把命令行选项参数放在文件里,然后运行 ghfs --config <file>

@wangdemon
Copy link
Author

可以把命令行选项参数放在文件里,然后运行 ghfs --config

好的,感谢老大无私奉献

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants