Skip to content

database path is not relative to APP_DATA_PATH #3816

Closed
@mqus

Description

@mqus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions