Skip to content

Gitea's path system quirk and bug #24222

Closed
@wxiaoguang

Description

@wxiaoguang

Description

In history, Gitea's binary was designed to use the binary directory as working directory, it tries to create/use its "data"/"custom" directories in the binary path. For example: running /usr/local/bin/gitea makes Gitea try to use /usr/local/bin/custom directory, which is improper/wrong, and it causes a lot of problems.

POSIX users please use https://github.com/go-gitea/gitea/tree/main/contrib/fhs-compliant-script , do not put Gitea binary into /usr/loca/bin directory -- unless you are 100% sure about the details.

"custom" bug

A feedback from discord


Update gitea from 1.15.6 to 1.15.7 (and then 1.19.1):

Failed to include custom: open /usr/local/bin/custom/conf/app.ini: permission denied
2023/04/20 06:06:09 cmd/dump.go:150:fatal() [F] Failed to include custom: open /usr/local/bin/custom/conf/app.ini: permission denied

I'm using the script in contrib/upgrade.sh and as far as I'm concerned I have never used this "custom" folder, why is it needed? (I am using sqlite3 as well)

I don't get why it's trying to read/write in that particular folder and not from /var/lib/gitea/custom

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions