Windows 10 mongod don't find files in _tmp when data directory is subdirectory of C:\User

Issue running mongod on Windows 10:

sort stage of aggregation (allow disk use: true) fails with following error
_tmp/extsort-time-sorter.2: errno:2 No such file or directory when dbPath is a subdirectory of C:Users.
After moving the database files to C:\data for example, the same aggregation succeeds.
Is there a way to fix this without changing the dbPath directory.
I would be thankful any help.

So your mongod comes up on c:/Users/xyz but not able to create _tmp/files?
Not clear what you meant by moving datafiles to c:/data
You will be pointing dbpath to c:/data or c:users/xyz
As long as mongod has write permissions it should work whichever path you choose

1 Like