CreateIssuesIndexer: mkdir indexers: permission denied #570

Closed
opened 2025-11-02 03:28:29 -06:00 by GiteaMirror · 19 comments
Owner

Originally created by @NuLL3rr0r on GitHub (Mar 23, 2017).

  • Gitea version (or commit ref): 1.1.0
  • Git version: 2.11.1
  • Operating system: FreeBSD 11.0-RELEASE-p8 (or) FreeBSD 10.3-RELEASE-p17
  • Database (use [x]):
    • [X ] PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • [X ] Not relevant
  • Log gist:
2017/03/23 14:47:42 [I] Log Mode: File(Info)
2017/03/23 14:47:42 [I] XORM Log Mode: File(Info)
2017/03/23 14:47:42 [I] Cache Service Enabled
2017/03/23 14:47:42 [I] Session Service Enabled
2017/03/23 14:47:42 [I] Mail Service Enabled
2017/03/23 14:47:42 [I] Notify Mail Service Enabled
2017/03/23 14:47:43 [I] Git Version: 2.11.1
2017/03/23 14:47:43 [...els/issue_indexer.go:77 InitIssueIndexer()] [E] CreateIssuesIndexer: mkdir indexers: permission denied

Description

I updated two of my productions Gitea servers from v1.0.1 to v1.1.0 through FreeBSD ports and now Gitea service refuses to start with the following line in the logs:

2017/03/23 14:47:43 [...els/issue_indexer.go:77 InitIssueIndexer()] [E] CreateIssuesIndexer: mkdir indexers: permission denied

The error is very ambiguous and hard to understand. So, now both servers are simply out of production due to this error or whatever caused it.

Originally created by @NuLL3rr0r on GitHub (Mar 23, 2017). - Gitea version (or commit ref): 1.1.0 - Git version: 2.11.1 - Operating system: FreeBSD 11.0-RELEASE-p8 (or) FreeBSD 10.3-RELEASE-p17 - Database (use `[x]`): - [X ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X ] Not relevant - Log gist: ``` 2017/03/23 14:47:42 [I] Log Mode: File(Info) 2017/03/23 14:47:42 [I] XORM Log Mode: File(Info) 2017/03/23 14:47:42 [I] Cache Service Enabled 2017/03/23 14:47:42 [I] Session Service Enabled 2017/03/23 14:47:42 [I] Mail Service Enabled 2017/03/23 14:47:42 [I] Notify Mail Service Enabled 2017/03/23 14:47:43 [I] Git Version: 2.11.1 2017/03/23 14:47:43 [...els/issue_indexer.go:77 InitIssueIndexer()] [E] CreateIssuesIndexer: mkdir indexers: permission denied ``` ## Description I updated two of my productions Gitea servers from v1.0.1 to v1.1.0 through FreeBSD ports and now Gitea service refuses to start with the following line in the logs: ``` 2017/03/23 14:47:43 [...els/issue_indexer.go:77 InitIssueIndexer()] [E] CreateIssuesIndexer: mkdir indexers: permission denied ``` The error is very ambiguous and hard to understand. So, now both servers are simply out of production due to this error or whatever caused it.
GiteaMirror added the type/question label 2025-11-02 03:28:29 -06:00
Author
Owner

@cez81 commented on GitHub (Mar 23, 2017):

Have you got an indexers directory in the same directory as gitea? If yes, what permissions? If no, try creating it.

@cez81 commented on GitHub (Mar 23, 2017): Have you got an `indexers` directory in the same directory as gitea? If yes, what permissions? If no, try creating it.
Author
Owner

@psolyca commented on GitHub (Mar 24, 2017):

I have the same issue and I have to delete them each time I update Gitea even of they have the right permissions.

I am using mysql and a compiled version (ae9b02b0).

@psolyca commented on GitHub (Mar 24, 2017): I have the same issue and I have to delete them each time I update Gitea even of they have the right permissions. I am using mysql and a compiled version (ae9b02b0).
Author
Owner

@lunny commented on GitHub (Mar 25, 2017):

@psolyca maybe the Gitea direcotry is not owned by user git.

@lunny commented on GitHub (Mar 25, 2017): @psolyca maybe the Gitea direcotry is not owned by user `git`.
Author
Owner

@psolyca commented on GitHub (Mar 25, 2017):

I am using Arch Linux version
https://aur.archlinux.org/packages/gitea-git/
Which is installed, ran with gitea user and group. Everything is homogeneous with gitea user.
I will try with git user.

@NuLL3rr0r do you use git user or an other one ?

@psolyca commented on GitHub (Mar 25, 2017): I am using Arch Linux version https://aur.archlinux.org/packages/gitea-git/ Which is installed, ran with gitea user and group. Everything is homogeneous with gitea user. I will try with git user. @NuLL3rr0r do you use git user or an other one ?
Author
Owner

@NuLL3rr0r commented on GitHub (Mar 26, 2017):

@cez81 thank you for the suggestion. I do not have access to the server at the moment but I'll check and report back.

@psolyca if I recall correctly it was git user. I'll check on that too and report back.

@NuLL3rr0r commented on GitHub (Mar 26, 2017): @cez81 thank you for the suggestion. I do not have access to the server at the moment but I'll check and report back. @psolyca if I recall correctly it was git user. I'll check on that too and report back.
Author
Owner

@NuLL3rr0r commented on GitHub (Mar 26, 2017):

@cez81 I have /var/db/gitea/data as APP_DATA_PATH and there is no indexers directory inside /var/db/gitea.

@psolyca The user and the group are git.

@NuLL3rr0r commented on GitHub (Mar 26, 2017): @cez81 I have /var/db/gitea/data as APP_DATA_PATH and there is no indexers directory inside /var/db/gitea. @psolyca The user and the group are git.
Author
Owner

@cez81 commented on GitHub (Mar 26, 2017):

@NuLL3rr0r I don't think indexers uses APP_DATA_PATH. Try setting something like this instead in your app.ini

[indexer]
ISSUE_INDEXER_PATH = /var/db/gitea/data/indexers/issues.bleve
@cez81 commented on GitHub (Mar 26, 2017): @NuLL3rr0r I don't think indexers uses APP_DATA_PATH. Try setting something like this instead in your app.ini ``` [indexer] ISSUE_INDEXER_PATH = /var/db/gitea/data/indexers/issues.bleve ```
Author
Owner

@psolyca commented on GitHub (Mar 26, 2017):

I reinstall the same recompiled version with git user and group (without removing old version).
So everything has changed to git user and I do not have the issue anymore.
I tried with reinstalling the same version with gitea user and group and I have also no issue.

Does the indexers files and folder follow a version of gitea ? I will try with an other version to see if the issue come back.

@psolyca commented on GitHub (Mar 26, 2017): I reinstall the same recompiled version with git user and group (without removing old version). So everything has changed to git user and I do not have the issue anymore. I tried with reinstalling the same version with gitea user and group and I have also no issue. Does the indexers files and folder follow a version of gitea ? I will try with an other version to see if the issue come back.
Author
Owner

@NuLL3rr0r commented on GitHub (Apr 2, 2017):

@cez81 Thank you so much!

That solved the issue for me.

@NuLL3rr0r commented on GitHub (Apr 2, 2017): @cez81 Thank you so much! That solved the issue for me.
Author
Owner

@fbettag commented on GitHub (Apr 8, 2017):

worked here too! thanks

@fbettag commented on GitHub (Apr 8, 2017): worked here too! thanks
Author
Owner

@bkcsoft commented on GitHub (Apr 18, 2017):

@NuLL3rr0r So, is this issue resolved? Do we need better documentation on this? Better defaults? :)

@bkcsoft commented on GitHub (Apr 18, 2017): @NuLL3rr0r So, is this issue resolved? Do we need better documentation on this? Better defaults? :)
Author
Owner

@cez81 commented on GitHub (Apr 18, 2017):

Maybe move indexers into the data directory? Or is there a reason why it isn't in there?

@cez81 commented on GitHub (Apr 18, 2017): Maybe move indexers into the data directory? Or is there a reason why it isn't in there?
Author
Owner

@NuLL3rr0r commented on GitHub (Apr 19, 2017):

@bkcsoft

Well, it solved the issue for me and it seems for others, too. But, I believe @cez81 is right; why it isn't there by default?
In addition to the documentation, it would be a good idea to add that option to the sample config file.

Thanks!

@NuLL3rr0r commented on GitHub (Apr 19, 2017): @bkcsoft Well, it solved the issue for me and it seems for others, too. But, I believe @cez81 is right; why it isn't there by default? In addition to the documentation, it would be a good idea to add that option to the sample config file. Thanks!
Author
Owner

@lunny commented on GitHub (Apr 19, 2017):

Maybe @ethantkoenig could give us his consideration when he sent that PR.

@lunny commented on GitHub (Apr 19, 2017): Maybe @ethantkoenig could give us his consideration when he sent that PR.
Author
Owner

@ethantkoenig commented on GitHub (Apr 21, 2017):

I admittedly didn't put a lot of thought into the default ISSUE_INDEXER_PATH value. If anyone thinks it would make sense to change it, I'm open to suggestions.

@ethantkoenig commented on GitHub (Apr 21, 2017): I admittedly didn't put a lot of thought into the default `ISSUE_INDEXER_PATH` value. If anyone thinks it would make sense to change it, I'm open to suggestions.
Author
Owner

@lunny commented on GitHub (Apr 21, 2017):

Maybe ISSUE_INDEXER_PATH = /var/db/gitea/data/indexers/issues.bleve should be added to config cheetsheet and change the default value to gitea/data.

@lunny commented on GitHub (Apr 21, 2017): Maybe `ISSUE_INDEXER_PATH = /var/db/gitea/data/indexers/issues.bleve` should be added to config cheetsheet and change the default value to `gitea/data`.
Author
Owner

@jerrykan commented on GitHub (Oct 19, 2017):

I just got hit by this issue trying to migrate from gogs v0.9.141 to gitea v1.2.0

If the default value is ISSUE_INDEXER_PATH = indexers/issues.bleve what is the indexers/issues.bleve path relative to? the data directory? the current working directory?

Does the app.ini config support variable interpolation like ISSUE_INDEXER_PATH = %{APP_DATA_PATH}/indexers/issues.bleve? or is it worth adding support so that these relative paths can be a bit more explicit?

@jerrykan commented on GitHub (Oct 19, 2017): I just got hit by this issue trying to migrate from gogs v0.9.141 to gitea v1.2.0 If the default value is `ISSUE_INDEXER_PATH = indexers/issues.bleve` what is the `indexers/issues.bleve` path relative to? the data directory? the current working directory? Does the `app.ini` config support variable interpolation like `ISSUE_INDEXER_PATH = %{APP_DATA_PATH}/indexers/issues.bleve`? or is it worth adding support so that these relative paths can be a bit more explicit?
Author
Owner

@cez81 commented on GitHub (Oct 19, 2017):

Relative to the binary.

It does.

https://github.com/go-gitea/gitea/pull/2192 should move indexers directory to APP_DATA_PATH.

@cez81 commented on GitHub (Oct 19, 2017): Relative to the binary. It does. https://github.com/go-gitea/gitea/pull/2192 should move indexers directory to APP_DATA_PATH.
Author
Owner

@lafriks commented on GitHub (Nov 3, 2017):

Path is no relative to data directory. Fixed by #2192

@lafriks commented on GitHub (Nov 3, 2017): Path is no relative to data directory. Fixed by #2192
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#570