mjpclab / go-http-file-server

Simple command line based HTTP file server to share local file system
MIT License
379 stars 55 forks source link

Suggestion: archive-dir-user #37

Closed fimmspin closed 4 months ago

fimmspin commented 6 months ago

Please add possibility to set an archive-dir per user config, as delete-dir-user. Thanks

marjune163 commented 6 months ago

If directory is accessible to a user, then it is always possible to download all files one by one. The only different is the user don't need to download one by one manually. So I think the "archive" is not a access control permission. If you want to enable archive for some users, just enable for all users.

But yes this may increase the risk of server loads, even DOS attacks. To make the application simple, currently I choose not adding the per-user archive option.

fimmspin commented 6 months ago

Yes, you are right, I don't want to enable Archive for all users because i fear that someone may .zip the full content of very very big folders, so causing a server's overload or problem. It may be useful only for a few power-users. I keep it disabled until an --archive-dir-user configuration may be available some time. :) Thanks.

marjune163 commented 5 months ago

Version 1.18.1 adds --archive-user and --archive-dir-user.