Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitea --help fails #25938

Closed
remram44 opened this issue Jul 17, 2023 · 2 comments · Fixed by #25944
Closed

gitea --help fails #25938

remram44 opened this issue Jul 17, 2023 · 2 comments · Fixed by #25944
Labels

Comments

@remram44
Copy link

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

@remram44
Copy link
Author

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...?

@wxiaoguang
Copy link
Contributor

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

jolheiser pushed a commit that referenced this issue Jul 18, 2023
The "creating dir/file during load config" is a longstanding and complex
problem.

This PR only does a quick patch, it still needs more refactorings in the
future.

Fix #25938
wxiaoguang added a commit to wxiaoguang/gitea that referenced this issue Jul 18, 2023
The "creating dir/file during load config" is a longstanding and complex
problem.

This PR only does a quick patch, it still needs more refactorings in the
future.

Fix go-gitea#25938
lafriks pushed a commit that referenced this issue Jul 18, 2023
Backport #25944

The "creating dir/file during load config" is a longstanding and complex
problem.

This PR only does a quick patch, it still needs more refactorings in the
future.

Fix #25938
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants