gitea --help fails #11252

Closed
opened 2025-11-02 09:32:17 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @remram44 on GitHub (Jul 17, 2023).

Description

Running gitea --help will fail to show the help message if I don't have write permissions to the folder:

$ /opt/gitea --help
2023/07/17 14:00:02 ...s/setting/setting.go:109:LoadCommonSettings() [F] Unable to load settings from config: unable to create chunked upload directory: /opt/data/tmp/package-upload (mkdir /opt/data: permission denied)

Gitea Version

1.20.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.25.1

Operating System

Linux amd64 (Ubuntu 20.04)

How are you running Gitea?

Downloaded the official binary

Database

None

Originally created by @remram44 on GitHub (Jul 17, 2023). ### Description Running `gitea --help` will fail to show the help message if I don't have write permissions to the folder: ``` $ /opt/gitea --help 2023/07/17 14:00:02 ...s/setting/setting.go:109:LoadCommonSettings() [F] Unable to load settings from config: unable to create chunked upload directory: /opt/data/tmp/package-upload (mkdir /opt/data: permission denied) ``` ### Gitea Version 1.20.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.25.1 ### Operating System Linux amd64 (Ubuntu 20.04) ### How are you running Gitea? Downloaded the official binary ### Database None
GiteaMirror added the type/bug label 2025-11-02 09:32:17 -06:00
Author
Owner

@remram44 commented on GitHub (Jul 17, 2023):

A workaround is to set GITEA_WORK_DIR, for example:

$ GITEA_WORK_DIR=/tmp/test-gitea /opt/gitea --help

This will work, but will also create the folders /tmp/test-gitea/data/tmp/package-upload, which seems wrong for just running --help...?

@remram44 commented on GitHub (Jul 17, 2023): A workaround is to set `GITEA_WORK_DIR`, for example: ``` $ GITEA_WORK_DIR=/tmp/test-gitea /opt/gitea --help ``` This will work, but will also create the folders `/tmp/test-gitea/data/tmp/package-upload`, which seems wrong for just running `--help`...?
Author
Owner

@wxiaoguang commented on GitHub (Jul 18, 2023):

I also noticed that there is a package-upload in my work-path .... Will fix it

@wxiaoguang commented on GitHub (Jul 18, 2023): I also noticed that there is a `package-upload` in my work-path .... Will fix it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11252