rustic-rs / rustic_server

A REST server built in rust for use with rustic/restic
https://rustic.cli.rs/ecosystem/rustic-server/
GNU Affero General Public License v3.0
18 stars 2 forks source link

If ACLs are disabled, it should not require the file to exist #60

Closed ogarcia closed 1 week ago

ogarcia commented 1 week ago

Let's take this configuration as an example:

[acl]
acl-path = "/test_data/test_repo/acl.toml"
private-repo = false
append-only = false

Since I have private-repo set to false it should not even access the ACL file. However when I run the application it gives an error:

% ./rustic-server -c rustic-server.toml serve
error: storage error: Could not create ACL due to Internal server error: `Could not read toml file: No such file or directory (os error 2) at "/etc/rustic-server/acl.toml"`

On the other hand I think it is more descriptive to use a disable-acl key (in the style of disable-auth) than private-repo.

simonsan commented 1 week ago

I'm currently working on refactoring some more things, so it's easier to transition into a runtime context after parsing and loading the config. This will be fixed with the next release. 👍🏽

simonsan commented 1 week ago

This should be fixed in the new release: https://github.com/rustic-rs/rustic_server/releases/tag/v0.3.0

Please reopen, if that is not the case. 👍🏽

ogarcia commented 1 week ago

It works perfectly, thank you very much!

BTW, I maintain the rustic-server package in the AUR, anything weird you see or would like to change, feel free to tell me about it.