-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Unable to access '/etc/gitconfig': Permission denied #32207
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
Comments
You need to speak to your provider , permissions were not set |
Like I described, Gitea is running as root and a move of the Virtual Machine should not change anything about permissions inside of it. Even if I set the permissions of
|
I just found out, that I can browse the repositories again when moving No success. If the file is there, Gitea shows the error. If I remove it, everything seems to work. -rw-rw-r-- 1 root root 126 Jun 13 2023 /etc/gitconfig |
The configuration file will be read by |
Our instance of Gitea was installed using the Ubuntu snap package (Just like the GitKraken instance in the link above). I understand Gitea is just trying to read the system provided file, I'll ask anyway: do you have any idea what might cause that file to be locked? And why Gitea might not be able to access it despite being run as root? I have run some checks: # fuser - identify processes using files or sockets
~$ fuser /etc/gitconfig
# no result, so nothing really holds a lock on the file # lsof - list open files
~$ lsof | grep /etc/gitconfig
# no result either, the file is not opened by any process # ps - report a snapshot of the current processes
~$ ps -U root -u root u | grep gitea
root 1562209 0.1 4.3 2213708 173012 ? Ssl Jan03 9:53 /snap/gitea/7224/gitea web
# confirm that gitea is indeed run as root My suspicion is, that this has to do with the Gitea snap being sandboxed. |
I think this won't be an issue after 1.24 as /etc/gitconfig won't be accessed by gitea anymore, but I have no way to test it. |
I will wait and test |
The app armor profile is disallowing this. You can check with
|
Perfect, thank you :-) This also feels like the right way from the start. |
In 1.24, we don't use the global gitconfig anymore ( Make Gitea always use its internal config, ignore /etc/gitconfig #33076 ) |
Description
Since a couple of days, out of a sudden, we can no longer access any of our repositories.
The frontend shows a 500 error:
Our provider has moved the virtual server we are using but I can not think of a reason why this should change anything regarding permissions inside the virtual machine?! Maybe a git update?
The default snap behaviour is to run Gitea as root and we haven’t changed that.
If there is anything we can test, check or provide, please let us know.
Gitea Version
1.22.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/vollstock/341fb6739a3f3ac88923081fe665384c
Screenshots
No response
Git Version
2.34.1
Operating System
Ubuntu 22.04.5 LTS
How are you running Gitea?
snap package with systemd
Database
SQLite
The text was updated successfully, but these errors were encountered: