[x]
):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
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.
Have you got an indexers
directory in the same directory as gitea? If yes, what permissions? If no, try creating it.
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 maybe the Gitea direcotry is not owned by user git
.
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 ?
@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.
@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 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
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.
@cez81 Thank you so much!
That solved the issue for me.
worked here too! thanks
@NuLL3rr0r So, is this issue resolved? Do we need better documentation on this? Better defaults? :)
Maybe move indexers into the data directory? Or is there a reason why it isn't in there?
@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!
Maybe @ethantkoenig could give us his consideration when he sent that PR.
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.
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
.
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?
Relative to the binary.
It does.
https://github.com/go-gitea/gitea/pull/2192 should move indexers directory to APP_DATA_PATH.
Path is no relative to data directory. Fixed by #2192
Most helpful comment
@NuLL3rr0r I don't think indexers uses APP_DATA_PATH. Try setting something like this instead in your app.ini