restic / rest-server

Rest Server is a high performance HTTP server that implements restic's REST backend API.
BSD 2-Clause "Simplified" License
943 stars 140 forks source link

Expose command line option to configure FileMode and DirMode #189

Open mlusetti opened 2 years ago

mlusetti commented 2 years ago

Output of rest-server --version

rest-server version rest-server 0.11.0 compiled with go1.17.3 on linux/amd64

What should rest-server do differently?

Expose options to let user configure the desired FileMode and DirMode the server use to store files

What are you trying to do? What is your use case?

I want to use Syncthing.net to replicate over a peer(s) backup server(s)

Did rest-server help you today? Did it make you happy in any way?

It has helped and made me happy every day since I started using it some years ago ... Thanks!

rawtaz commented 2 years ago

@mlusetti Can you please explain the initial problem you're trying to solve here? Obviously it's about filesystem permissions - can you show a clear example of what the ones that are problematic for you look like, and elaborate on the issue at hand? The fact that you want to use Syncthing isn't something that should be impossible to do out of the box per se.

mlusetti commented 2 years ago

@mlusetti Can you please explain the initial problem you're trying to solve here? Obviously it's about filesystem permissions - can you show a clear example of what the ones that are problematic for you look like, and elaborate on the issue at hand? The fact that you want to use Syncthing isn't something that should be impossible to do out of the box per se.

The main issue is I need or will to use different "unix" users to run rest-server and syncthing giving each one a "unix group" in common so I can give the group "read" permission on rest-server storage directory so I'm pretty sure the syncthing process will never write to rest-server storage directory but only read even if I misconfigure it.

@rawtaz Thanks for your attention.

MichaelEischer commented 2 years ago

That effectively means that it would be enough to have the option to store files and directories such that they are group accessible. Then you can use ACLs to grant syncthing access to your repository?

mlusetti commented 2 years ago

That effectively means that it would be enough to have the option to store files and directories such that they are group accessible. Then you can use ACLs to grant syncthing access to your repository?

Yes, using ACL or just standard unix permissions. Anyway that would be enough.