Exits without error when incorrect user owns directories #3165

Closed
opened 2025-11-02 05:02:30 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @coolaj86 on GitHub (Apr 9, 2019).

  • Gitea version (or commit ref): v1.7.5
  • Git version: v2.17.1
  • Operating system: Ubuntu 18.04.2 LTS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
/opt/gitea/gitea --config /opt/gitea/custom/conf/app.ini
2019/04/09 21:42:48 [T] AppPath: /opt/gitea/gitea
2019/04/09 21:42:48 [T] AppWorkPath: /opt/gitea
2019/04/09 21:42:48 [T] Custom path: /opt/gitea/custom
2019/04/09 21:42:48 [T] Log path: /opt/gitea/log

Description

I copied my gitea v1.5.x installation over to a new server and ended up with folders having incorrect permissions.

I got the output above and then exit(1).

I figured it was something to do with users or permissions due to the move, but it seems like it should have panic()d or output some sort of error message.

Solution

sudo chown -R git:git /opt/gitea /srv/gitea /var/log/gitea

Screenshots

N/A

Originally created by @coolaj86 on GitHub (Apr 9, 2019). - Gitea version (or commit ref): v1.7.5 - Git version: v2.17.1 - Operating system: Ubuntu 18.04.2 LTS - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ``` /opt/gitea/gitea --config /opt/gitea/custom/conf/app.ini 2019/04/09 21:42:48 [T] AppPath: /opt/gitea/gitea 2019/04/09 21:42:48 [T] AppWorkPath: /opt/gitea 2019/04/09 21:42:48 [T] Custom path: /opt/gitea/custom 2019/04/09 21:42:48 [T] Log path: /opt/gitea/log ``` ## Description I copied my gitea v1.5.x installation over to a new server and ended up with folders having incorrect permissions. I got the output above and then exit(1). I figured it was something to do with users or permissions due to the move, but it seems like it should have panic()d or output some sort of error message. ## Solution ``` sudo chown -R git:git /opt/gitea /srv/gitea /var/log/gitea ``` ## Screenshots N/A
Author
Owner

@zeripath commented on GitHub (Apr 9, 2019):

There's a problem with logging pre-1.9 whereby the message that is sent with log.fatal doesn't get logged before the the program exits. I suspect therefore it does get logged but it disappears.

This is fixed in master (1.9)

@zeripath commented on GitHub (Apr 9, 2019): There's a problem with logging pre-1.9 whereby the message that is sent with log.fatal doesn't get logged before the the program exits. I suspect therefore it does get logged but it disappears. This is fixed in master (1.9)
Author
Owner

@zeripath commented on GitHub (Apr 9, 2019):

Could you try on master and see if you have the same result?

@zeripath commented on GitHub (Apr 9, 2019): Could you try on master and see if you have the same result?
Author
Owner

@coolaj86 commented on GitHub (Apr 10, 2019):

It appears to still be broken. I just tried upgrading from 1.7.5 to 1.9-dev and it keeps crashing without any error message (and that's will the permissions set correctly).

@coolaj86 commented on GitHub (Apr 10, 2019): It appears to still be broken. I just tried upgrading from 1.7.5 to 1.9-dev and it keeps crashing without any error message (and that's will the permissions set correctly).
Author
Owner

@coolaj86 commented on GitHub (Apr 10, 2019):

I was told that the logging behavior was changed in v1.7 so it was actually the issue of my config file being interpreted differently.

@coolaj86 commented on GitHub (Apr 10, 2019): I was told that the logging behavior was changed in v1.7 so it was actually the issue of my config file being interpreted differently.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3165