v.1.1.1-217-g1a0f2c99
The version was build from source 3 days ago
OS: debian buster
GO: 1.13
Installed dgraph, build a db, tried to alter an index of a schema via dgo or ratel.
Expected: schema gets reindexed dgraph runs as a linux user with all rights for the data directories and execution of dgraph.
Reported Error:
draft.go:470] Applying proposal. Error: error creating in temp dir for reindexing: mkdir dgraph_index: permission denied. Proposal: "mutations:
Tried to use to run with "cwd" for all zero and alpha for the directory where p, w, zw are located and which also has the user rights to, but that didn't help.
Creating a directory in the roots /tmp is no problem for the user.
So I can't figure out, where dgraph wants to create this dir "dgraph_index", in prior versions I never had this problem.
Looks like that this problem was introduced by #4440
@AugustHell we try to create a directory in the same folder where dgraph is running. This directory is used to store the data temporarily while the index is getting built. Could you tell me what is the cwd for the dgraph alpha process?
That was a good hint, pwdx showed / for the working directory.
Added
WorkingDirectory=... // dir where the dgraphs p, w, zw exists
to the dgraph.service file for systemctl and it works now.
Might be an idea to check if the -cwd flag was used (I tried that with a config file).
Thanks for the quick help!
That makes sense. Let me see whether we want to do something about it. Thanks for reporting the issue.
We have received multiple reports from users where they have observed this issue. We should consider using a directory such as /tmp instead.