bitmagnet-io / bitmagnet

A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.
https://bitmagnet.io/
MIT License
2.08k stars 80 forks source link

permissions of postgres data folder #114

Closed rezad1393 closed 5 months ago

rezad1393 commented 5 months ago

Have you checked the roadmap on the website, and existing issues, before opening a dupllcate issue? Yes

Is your feature request related to a problem? Please describe. I want to be able to run this as regular user and access the database (I have added my user to docker group). when I run this as docker, the postgres data folder gets its permission set as userid=70 and group root. I can change the owner and mod of data folder but at the next run the postgres folder gets userid of 70 again and its permission gets reset to only user drwx------

Describe the solution you'd like I want to be able to access the db it is creates, which a better way would be the database to be created the user owned.

Describe alternatives you've considered changing the permission after every run. not really elegant.

.

mgdigital commented 5 months ago

Hi, I don't think I've understood the problem being caused by the file permissions but it would be best to refer to the Postgres and/or Docker documentation to resolve this.

The app can be configured to point at any Postgres instance. If you're using the example docker-compose file the database will be exposed on port 5432 and you can connect using the credentials provided in the environment variables (by default user postgres/password postgres).

rezad1393 commented 5 months ago

Hi, I don't think I've understood the problem being caused by the file permissions but it would be best to refer to the Postgres and/or Docker documentation to resolve this.

The app can be configured to point at any Postgres instance. If you're using the example docker-compose file the database will be exposed on port 5432 and you can connect using the credentials provided in the environment variables (by default user postgres/password postgres).

I don't personally use databases (outside of sqlite) so I didn't mean I can't access the db or not via postgres.

what I meant was this: when I tried to use this app I created a folder in my home dir and named it bitmangnet. inside I created a compose.yaml and then run 'docker compose up' as my regular user (my user is added to docker group) so far so good. then I see that folder another created named 'data/postgres'. that folder in not accessible to my user because of permission set for that folder as 'ower userid:70 and group root)

this makes it problematic for folder management and backup.

I prefer the folder to have permission as my user. I don't know if this is at all possible but it would be a great enhancement.