Description
- Gitea version (or commit ref): 1.4.0
- Git version:
- Operating system:
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Strace for gitea serv:
https://gist.github.com/mqus/4ca46d66a9e9c858ba6af8e115513674
Description
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)
edit:styling