mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-22 14:34:54 -05:00
Permission denied after latest docker upgrade #2733
Closed
opened 2025-11-02 04:45:56 -06:00 by GiteaMirror
·
38 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
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c1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
type/bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#2733
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Aragur on GitHub (Jan 10, 2019).
31aa00f[x]):Description
After upgrading my docker-compose instance from Gitea to the latest version I get the following error (as seen above).
I already tried chowning the my mounted gitea volume to 999 (docker) and 1000 (default Gitea user) with now success.
@apricote commented on GitHub (Jan 10, 2019):
Can you add your
docker-compose.yaml?@Aragur commented on GitHub (Jan 10, 2019):
Sure, this is my
docker-compose.ymlI'm using the
proxynetwork to connect to mynginx reverse proxy@danofun commented on GitHub (Jan 10, 2019):
I'm getting the same error. Was running without issue prior to the update.
docker-compose.yml@danofun commented on GitHub (Jan 10, 2019):
For reference, reverting to
gitea/gitea:1.7.0-rc2corrects the error.@pr4xx commented on GitHub (Jan 11, 2019):
Same error here. Changing permissions in the mounted volume does not help for me.
@apricote commented on GitHub (Jan 11, 2019):
The message
migrate: /data/gitea/conf/app.ini: Permission deniedis coming from PR #5290, though @pciavald said that it is not causing any problems for him.Does Gitea still start for you?
@Aragur commented on GitHub (Jan 11, 2019):
Nope Gitea isn't starting, caused by:
@zeripath commented on GitHub (Jan 11, 2019):
@apricote PR #5290 was to prevent that message from occuring so if it still is, then PR #5290 isn't working correctly - I suspect the message is coming up because gitea can't talk to the database - so hence the migrate is failing.
Got an error reading communication packetsmakes me highly suspicious of a problem with xorm. Is there anything in the xorm.log?@Aragur commented on GitHub (Jan 11, 2019):
@zeripath I checked my xorm.log and found the following lines repeatedly: https://pastebin.com/1J6CZkWW
I don't know if this is the normal behavior or not.
@zeripath commented on GitHub (Jan 13, 2019):
Hmm so that xorm.log isn't particularly enlightening... There was a bug with migration that was recently fixed #5682 . I don't know if you would be able to retry and see if that solves your issue.
@Aragur commented on GitHub (Jan 13, 2019):
I gave this PR a try, but this issue is still persistent in the latest version.
@zeripath commented on GitHub (Jan 13, 2019):
Hmm do you mean latest or v1.7?
@Aragur commented on GitHub (Jan 13, 2019):
1.7 is working fine.
Latest isn't working.
@zeripath commented on GitHub (Jan 13, 2019):
Ok right, this is annoying.
If you're able to edit the entry point file of the latest could you try to change the migrate line to:
@Aragur commented on GitHub (Jan 14, 2019):
How can I edit this file?
Do I have to build a docker image on my own?
@zeripath commented on GitHub (Jan 14, 2019):
OK
Or something equivalent then you should be able to edit the /usr/bin/entrypoint file.
@Aragur commented on GitHub (Jan 14, 2019):
After changing the entrypoint I get the following error:
@zeripath commented on GitHub (Jan 14, 2019):
You don't have the latest docker.
That's bug #5861 which was fixed in PR #5862 which was committed to master on January 12 as commit
9e9d1b8f95and should have been in docker shortly after.You need to remove your current docket image and get the latest docker image again. That is what I was asking a day ago.
I think however we should change the migrate line to the one I've suggested above as it's clearly better.
@Aragur commented on GitHub (Jan 14, 2019):
I upgraded Docker to version 18.09.1, build 4c52b90
I also did a system prune.
I pulled the latest image of gitea.
I'm still getting:
migrate: /data/gitea/conf/app.ini: Permission denied@techknowlogick commented on GitHub (Jan 15, 2019):
I've found that the second -c (the one passed to gitea migrate) is actually trying to be interpreted by
su, and so I've incorporated the command that @zeripath suggested into the linked PR. I changed directory inside ofsucall, so that it doesn't change the working directory for the rest of the commands.@zeripath commented on GitHub (Jan 15, 2019):
@AragurDEV Sorry to hear you're still having problems. It's not our aim and we really do appreciate your patience.
Does Gitea still not start with the new docker image (I wouldn't necessarily be worried about the permission denied error if it does - it just means automigration isn't working.) If not, does changing the entrypoint line as I suggested, (copied again below), allow Gitea to start?
If it does, then we'll get the change put in to the master and you shouldn't have this problem again
Thanks once again for your patience.
@Aragur commented on GitHub (Jan 15, 2019):
@zeripath No problem, that's what the latest tag is for :)
It's still not working with the latest image.
Also modifying the entrypoint doesn't solve it neither. (Maybe I'm editing the file wrongly.. Is there any guide how to do that?
@Keridos commented on GitHub (Jan 18, 2019):
Latest still does not work for me even on latest commit
47ca1060dd@Aragur commented on GitHub (Jan 18, 2019):
I'm having the same issue as @Keridos
Still getting:
@lunny commented on GitHub (Jan 18, 2019):
@Keridos what's your logs?
@lunny commented on GitHub (Jan 18, 2019):
@AragurDEV it seems that's another issue?
@Aragur commented on GitHub (Jan 18, 2019):
@lunny it is the same issue as last time.
Just one line "permission denied" is missing.
@nik-bauer commented on GitHub (Jan 23, 2019):
Have you guys been able to fix this problem or found a proper workaround?
@lunny commented on GitHub (Jan 24, 2019):
@nik-bauer what's your issue? I think we have fixed this problem?
@pr4xx commented on GitHub (Jan 24, 2019):
When I change my docker compose file from gitea:1.6.3 to gitea:latest it still comes not up. Containerlogs just show the same starting up messages every few seconds.
@lunny commented on GitHub (Jan 24, 2019):
You could find logs on container's filesystem
/data/gitea/log/@pr4xx commented on GitHub (Jan 24, 2019):
2019/01/12 00:23:40 [...itea/routers/init.go:61 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: Error 1265: Data truncated for column 'theme' at row 1@nik-bauer commented on GitHub (Jan 25, 2019):
@lunny unfortunately I'm still getting the same issue as @pr4xx in the logs, as well as the initial
Aborted connection 2 to dblog message in the mariadb logs. Also I did set the default value forthemein theusertable of the db to an empty string, since I read in another issue that this would be causing those error logs...Was your fix by any chance depending on an up-to-date docker installation? Because I'm running Gitea as a docker instance on a Synology NAS which is limited to the docker install provided by Synology...
@danofun commented on GitHub (Jan 25, 2019):
Same docker-compose as posted above. The permission denied error that started this thread is gone but gitea:latest still fails to run. Same error as @pr4xx and @nik-bauer. It appears the same error was encountered in #5681 but that issue has been marked as closed. In our use case, fix #5682 does not seem to be a working patch. As suggested in #5681 I've used phpMyAdmin to edit Database:gitea Table:User and changed the Table column for each entry from NULL to gitea. I now have a working gitea:latest
@nik-bauer commented on GitHub (Jan 28, 2019):
@danofun thx to your reply I got it working now! The problem was that even though I set the default value for the field
themein theusertable to an empty string, all entries still kept their prior NULL value. So I guess an easy auto fix would be for gitea to set all existing entries to an empty string in a future update?For all the ppl looking for a quick fix:
Log into your MySQL db with:
mysql -u root -pChange to gitea database:
use gitea;Change all existing theme entries to empty string:
update user set theme = '';I hope all the MySQL commands are right, I was just recapping this from earlier today
@zuosc commented on GitHub (Feb 20, 2019):
I also have the same problem. so how to solve it?
@lunny commented on GitHub (Feb 20, 2019):
@zuosc I think there are serval problems in this thread. Please fire another issue to describe your issue.
@zuosc commented on GitHub (Feb 20, 2019):
https://github.com/go-gitea/gitea/issues/6130 here