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

./data/avatars used as avatar file of first organization created upon installing from scratch #1114

Closed
2 of 6 tasks
pmattern opened this issue Mar 3, 2017 · 1 comment · Fixed by #1122
Closed
2 of 6 tasks
Labels
Milestone

Comments

@pmattern
Copy link

pmattern commented Mar 3, 2017

  • Gitea version (or commit ref): d76d67d
  • Git version: 2.12.0
  • Operating system: Arch Linux x86_64
  • Database (use [x]):
    • PostgreSQL 9.6.1
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

When the first organization is created after installing from scratch, it is assigned a random icon which is saved as file ./data/avatars. This completely compromises any use of ./data/avatars as folder as usual.

To reproduce install Gitea from scratch, that is new database and so on, create an administrative user, have that user create the first organization of the Gitea instance and check the FHS.

The problem can not be seen when a directory ./data/avatars is created after installing but before creating the first organization or when an instance which preexists including a directory ./data/avatars is upgraded.
Either way new organizations are assigned the Gitea cup of tea as an icon, no longer the random icon as in earlier versions. I guess this is on purpose, but it is in contrast to a random icon still involved when the problem is manifest.
Permission issues weren't involved here as e. g. ./data/sessions is created as a folder and handled as usual.
Problem is a regression which didn't exist in 1f7837d which happens to be the last version I had installed from scratch.

EDIT Add behaviour when ./data/avatars preexists as directory plus some minor details.

@tboerger tboerger added this to the 1.1.0 milestone Mar 4, 2017
lunny added a commit to lunny/gitea that referenced this issue Mar 6, 2017
lunny added a commit that referenced this issue Mar 6, 2017
This PR fix the avatar bug described in #1114. This will fix random avatar is blank problem and potential delete avatars dir problem.
@pmattern
Copy link
Author

pmattern commented Mar 6, 2017

The problem is fixed running 2215840 under the very same circumstances as depicted in the initial comment here.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants