-
Notifications
You must be signed in to change notification settings - Fork 137
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
--private-repos flag is being ignored in docker image #206
Comments
I have not read all you wrote, but the value for OPTIONS in your compose file has one argument, not two. You should put a space between the |
I already tried that. I should have included that in my bug report but didn't want to increase the noise since I found an issue here that suggested to not use a whitespace as separator for the flags. Anyway, here's what happens with the
When changing the environment section to
|
This comment was marked as off-topic.
This comment was marked as off-topic.
It's just a syntax error in your compose file. The quotes around the arguments for OPTIONS are included in the value (Compose don't use quotes to delimit the value), so you need to remove them. Personally I always use the |
Thanks a lot, removing the |
Output of
rest-server --version
How did you run rest-server exactly?
The
docker-compose.yaml
is:The files in
/home/restic/data
are owned by UID 1003 including the.htpaswd
. The container is being started withdocker-compose up
. A user with a password has been created via the suggested way. That user (on a client machine) then proceeds to create a repo calledtest
with the urlrest:http://user:pass@servername:450/test
.What backend/server/service did you use to store the repository?
Ubuntu Server 18.04.05 and Docker version 20.10.12.
Expected behavior
I'd expect the output to look like this:
The
Private repositories
should readenabled
.Also note the last line when the server receives a call from the client to create a new repo
test
. I'd expect the server to deny access to the useruser
since the access request didn't include the user's directory as explained in https://github.com/restic/rest-server#usage.Actual behavior
What actually happens is this:
The server seems to ignore the private repos flag and allows the user
user
to create a repo outside of theuser
directory.Steps to reproduce the behavior
Just use the docker-file from above as repro-case. You might want to create a user with the UID 1003 or change that UID to an existing user on your system. Same for the
data/.htpasswd
file and its ownership.Do you have any idea what may have caused this?
Possibly the use of the
OPTIONS
-variable could be wrong since the expected formatting isn't documented. I had to dig through this repo's issues to guesstimate how it should be used, so that's likely a source for misunderstandings and outdated info.It could also be just a bug. I think this is most likely the case since the server usually logs when it didn't recognize a flag which means it did recognize the
--private-repos
flag but failed to apply it.Do you have an idea how to solve the issue?
Including a usage example for the OPTIONS variable in the README.md might help.
Did rest-server help you today? Did it make you happy in any way?
Absolutely! The server's
append-only
mode seems to be a great way for protecting previous backups from bad things happening on a client machine.The text was updated successfully, but these errors were encountered: