[x]
):On archlinux I installed the gitea-package from AUR and tried to clone a repository over ssh which didn't work and threw an error similar to the one in serv.log:
2018/04/18 22:40:05 [...io/gitea/cmd/serv.go:102 runServ()] [F] setup: Failed to connect to database: Failed to create directories: mkdir data: permission denied
With a bit trial-and-error, I found out that in the app.ini
, APP_DATA_PATH
was set to /var/lib/gitea
but PATH
(for databases) was set to data/gitea.db
. As gitea serv
was run (indirectly) by the git clone
command on the client, it searched for the database file in /usr/bin/
instead of /var/lib/gitea
(see the strace output linked above) and tried to create a directory there. After I set PATH
to an absolute referenced path everything worked, but shouldn't this also work without referencing it absolutely?
This is more of a feature-request than a bug, but it is to promote consistency, as #2192 already adressed similar issues(#1419)
Had the same error. Setting database path to PATH = /var/lib/gitea/data/gitea.db fixed it for me as stated above.
Another "me too".
Same here. Took a couple of hours of my day...
Just got bit by this. Default SQLite setup running under non-root git
user on Ubuntu 18.04
Another one got bitten, default on Debian 9 was the relative path (data/gitea.db), also user git.
this problem its due the explained in #5482
Is this still a thing? If it isn't, its not documented, APP_DATA_PATH is not even in here: https://docs.gitea.io/en-us/config-cheat-sheet/. It would be nice if the comment next to that line in the ini
file would describe which data will be put into it.
Most helpful comment
Had the same error. Setting database path to PATH = /var/lib/gitea/data/gitea.db fixed it for me as stated above.