aiogram / aiogram/telegram-bot-api

permissions issue

Offen
#30 2 Kommentare 7 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
301
Forks
84
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

everything appears to be working as intended, except the container hard-codes user configuration i think, because no matter what i try, the files that are downloaded are owned by the user with id 101 user instead of the default 1000. Which means i can't get access to them without complicated dance.

I need to access the files from my n8n instance by sharing the volume, n8n runs on 1000:1000 and i have no way of getting read/ write access here. Ive smashed my head against the wall today trying to get this working. But nothing to show for it.

I tried UMAP: 0022
USERNAME: 1000
UID: 1000
user: 1000:1000

i tried mounting a directory on the host with telegram_data being pre-created with the correct permissions, but it creates directories per bot and i cant prepare that...

the solution really should be that setting:

```yml
telegram-bot-api:
image: aiogram/telegram-bot-api:latest
container_name: telegram-bot-api
restart: unless-stopped
user: "1000:1000" # <<< THIS SETTING
environment:
TELEGRAM_API_ID: "${TELEGRAM_API_ID}"
TELEGRAM_API_HASH: "${TELEGRAM_API_HASH}"
TELEGRAM_LOCAL: "1"
TELEGRAM_MAX_WEBHOOK_CONNECTIONS: "100"
TELEGRAM_VERBOSITY: "1"
volumes:
- telegram_files:/var/lib/telegram-bot-api
```

should work. From there it should setup everything as the 1000:1000 user giving n8n and the user account im using on the host automatic ownership.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.