-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Open
Labels
issue/not-a-bugThe reported issue is the intended behavior or the problem is not inside GiteaThe reported issue is the intended behavior or the problem is not inside Gitea
Description
Description
Hi,
I've read some threads about the permissions before. I also read about man: gitea dump and Gitea Backup and Restore. Anyway, for me the problem still exist for my use case:
# all went fine
core@coreos-test:~$ podman exec -u git --workdir /tmp gitea bash -c '/usr/local/bin/gitea dump --skip-db --type tar --file "/tmp/gitea-dump-$(date +%F).tar" --verbose --config /data/gitea/conf/app
.ini'
....
# went wrong:
core@coreos-test:~$ podman exec -u git --workdir /backup gitea bash -c 'ls -la /backup && /usr/local/bin/gitea dump --skip-db --type tar --file "/backup/gitea-dump-$(date +%F).tar" --verbose --config /data/gitea/conf/app.ini'
total 0
drwxr-xr-x 2 root root 44 Oct 9 19:00 .
dr-xr-xr-x 1 root root 65 Oct 9 19:47 ..
-rw-r--r-- 1 root root 0 Oct 9 19:47 db-gitea-backup-2025-10-09.sql
2025/10/09 19:48:22 cmd/dump.go:101:fatal() [F] Unable to create dump file "/backup/gitea-dump-2025-10-09.tar": open /backup/gitea-dump-2025-10-09.tar: permission deniedAs you can see, I'm using Fedora CoreOS (hence with SELinux), Gitea with MariaDb and have a Quadlet:
[Unit]
Description=Gitea: Git with a cup of tea - A painless self-hosted Git service.
Requires=gitea-db.service
After=gitea-db.service
[Container]
Image=docker.io/gitea/gitea:1.24
ContainerName=gitea
...
Volume=gitea-data:/data:Z
Volume=/etc/localtime:/etc/localtime:ro
Volume=%h/backup/gitea://backup:rw,Z
...On host I have:
core@coreos-test:~$ ll
drwxr-xr-x. 3 core core 19 Oct 8 19:14 backup
core@coreos-test:~$ ll backup/
drwxr-xr-x. 2 core core 44 Oct 9 19:00 gitea
core@coreos-test:~$ ll backup/gitea/
-rw-r--r--. 1 core core 0 Oct 9 19:47 db-gitea-backup-2025-10-09.sqlGitea as git user hasn't permissions to write (even root could). How is this use-case intended to be used? Maybe not really a problem with the Image, but not sure about. Any help is appreciated.
Gitea Version
1,24
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
From OCI Image on CentOS with rootless podman.
Database
MySQL/MariaDB
Metadata
Metadata
Assignees
Labels
issue/not-a-bugThe reported issue is the intended behavior or the problem is not inside GiteaThe reported issue is the intended behavior or the problem is not inside Gitea