-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 produces superfluous file / folder permission errors when installed through snap #27420
Comments
I believe a similar problem with the .ssh config folder was also report here: #25102 |
I believe this is intentional on behalf of snap due to their security model, but I'll keep this open in case someone else can provide more insight. |
If that is the case it may be worth mentioning this somewhere in the docs. I spent hours debugging permission problems with gitea this past week, and all that wasted time could have been avoided with a small footnote somewhere in your docs. :p |
The doc is updated in 1.21rc. So I am closing two of your three issues with the |
Description
Installing Gitea on Ubuntu Server using snap, it would appear as though the gitea service is unable to manipulate files in any folder on the system other than those in the /var/snap/gitea sub-dir. For example, I have a completely working configuration on my Ubuntu server using all default options. If I change this one line in the app.ini file:
Before:
After:
and try running the app by doing something like:
su -c "gitea web --port=3005" git
I get a ORM engine initialization attempt #1/10 failed. Error: failed to connect to database: Failed to create directories: mkdir /data: permission denied error.
Even if the /data/gitea/data folder / tree is created in advance, and the
git
user is set up as the owner, etc. the problem still persists:The most notable / strange part of this error is that gitea is complaining about the root folder /data rather than the full path /data/gitea/data, which suggests to me the app is trying to manipulate the root folder of the path for some strange reason, even though - as I've described above - it should have no reason to do so.
Gitea Version
Gitea version 1.20.5 built with GNU Make 4.3, go1.21.1 : bindata, sqlite, sqlite_unlock_notify, pam, cert
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
git version 2.34.1
Operating System
Ubuntu 22.04.3 LTS
How are you running Gitea?
I have tried running the app directly from the command line as the current user (
gitea ....
), indirectly from the command line as a specific user (ie:su -c "gitea...." git
), and indirectly as a systemd service (ie:systemctl start gitea
). In all cases the service runs fine with the default app.ini configuration, but changing ANY of the data paths (ie: APP_DATA_PATH, repository->ROOT, etc. etc.) results in the same error being thrown.Database
SQLite
The text was updated successfully, but these errors were encountered: