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

[Bug] doctor: crash if not able to open doctor.log #12706

Closed
6543 opened this issue Sep 4, 2020 · 3 comments · Fixed by #12264
Closed

[Bug] doctor: crash if not able to open doctor.log #12706

6543 opened this issue Sep 4, 2020 · 3 comments · Fixed by #12264
Labels

Comments

@6543
Copy link
Member

6543 commented Sep 4, 2020

Version v1.12.4

sudo -u gitea gitea doctor --all executed will just crash with:

panic: Failed to create sublogger (doctor): open doctor.log: permission denied

goroutine 1 [running]:
code.gitea.io/gitea/modules/log.NewLogger(0x3e8, 0x20d618a, 0x6, 0x20be030, 0x4, 0xc000192370, 0x42, 0x1fa9d20)
	/home/user/aports/community/gitea/src/src/code.gitea.io/gitea/modules/log/log.go:48 +0x1ad
code.gitea.io/gitea/cmd.runDoctor(0xc0003c8840, 0x0, 0xc0003c86e0)
	/home/user/aports/community/gitea/src/src/code.gitea.io/gitea/cmd/doctor.go:149 +0x1aa
github.com/urfave/cli.HandleAction(0x1d49880, 0x2283168, 0xc0003c8840, 0xc00035ba00, 0x0)
	/home/user/aports/community/gitea/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:490 +0x82
github.com/urfave/cli.Command.Run(0x20d618a, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x218d96a, 0x11, 0x0, ...)
	/home/user/aports/community/gitea/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:210 +0x9fb
github.com/urfave/cli.(*App).Run(0xc001222340, 0xc0000a2150, 0x3, 0x3, 0x0, 0x0)
	/home/user/aports/community/gitea/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:255 +0x768
main.main()
	/home/user/aports/community/gitea/src/src/code.gitea.io/gitea/main.go:109 +0x972

I expect:

... that doctor tell me what I have to change to be able to execute it

@6543
Copy link
Member Author

6543 commented Sep 4, 2020

... or print Warning: could not write log - do not have permission to write doctor.log in current folder check only posible ....
and start checking if there is any probel (but --fix mode is disabled)

@stale
Copy link

stale bot commented Nov 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Nov 9, 2020
@6543
Copy link
Member Author

6543 commented Nov 9, 2020

no stale ... there is #12264

@stale stale bot removed the issue/stale label Nov 9, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
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