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

xDirectory 'gitea' already exists but the mode is different. #6388

Closed
5 tasks
stueja opened this issue Mar 20, 2019 · 3 comments
Closed
5 tasks

xDirectory 'gitea' already exists but the mode is different. #6388

stueja opened this issue Mar 20, 2019 · 3 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@stueja
Copy link

stueja commented Mar 20, 2019

  • Gitea version (or commit ref): Gitea version 1.7.4 built with go1.12 : bindata, sqlite, pam
  • Git version: git version 2.21.0
  • Operating system: Arch Linux x64
  • Database (use [x]):
    • PostgreSQL
    • [ x ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • [ x ] Not relevant
  • Log gist:

Description

Restarting the system makes gitea complain about permissions being too strict; every 2 seconds

Mar 20 06:54:02 brick systemd[30014]: StateDirectory 'gitea' already exists but the mode is different. (filesystem: 750 StateDirectoryMode: 755)
Mar 20 06:54:02 brick systemd[30014]: LogsDirectory 'gitea' already exists but the mode is different. (filesystem: 750 LogsDirectoryMode: 755)
Mar 20 06:54:02 brick gitea[30014]: 2019/03/20 06:54:02 [...s/setting/setting.go:741 NewContext()] [E] Failed to load custom conf '/etc/gitea/app>
Mar 20 06:54:02 brick systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Mar 20 06:54:02 brick systemd[1]: gitea.service: Failed with result 'exit-code'.
Mar 20 06:54:04 brick systemd[1]: gitea.service: Service RestartSec=2s expired, scheduling restart.
Mar 20 06:54:04 brick systemd[1]: gitea.service: Scheduled restart job, restart counter is at 71807.
Mar 20 06:54:04 brick systemd[1]: Stopped Gitea (Git with a cup of tea).
Mar 20 06:54:04 brick systemd[1]: Started Gitea (Git with a cup of tea).

Workaround:

systemctl stop gitea.service
chmod 755 /var/log/gitea
chmod 755 /var/lib/gitea
systemctl start gitea.service

After system restart, however, error messages start again filling the log.

Expected behavior:
gitea should not complain and error out on permissions being too strict. Also, it seems to be the only culprit responsible for changing the folder permissions.

@lunny
Copy link
Member

lunny commented Mar 20, 2019

I think that's systemctl's complain but not Gitea's

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Mar 20, 2019
@stueja
Copy link
Author

stueja commented Mar 20, 2019

Oh, yes, as you say it, I see that the line begins with systemd. The question is then, where from does systemd get the information that a directory should have a certain mode? I couldn't find anything in app.ini nor in gitea.service.

@stueja
Copy link
Author

stueja commented Mar 22, 2019

After researching, yes, this is a warning message from systemd.
The real problem, which I observed is that gitea didn't want to start. I thought the permissions were the culpit when in fact they are not. I will research the remaining problem and open a new issue.

@stueja stueja closed this as completed Mar 22, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

2 participants