Resolving Azurite Error “EPERM operation not permitted”

If you try to invoke the Microsoft Storage Emulator (azurite.exe) and you see the following error, the solution is simple.

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator>azurite.exe
Azurite Blob service is starting at http://127.0.0.1:10000
Exit due to unhandled error: Error: EPERM: operation not permitted, open 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator\__azurite_db_blob__.json~'

The solution is simple. You will likely see this error if your current directory is the same as the directory where the EXE is store. You don’t want to run the program that way. It will result in the program attempting to place its temporary files in that folder. The better way is to ensure that the program’s folder is included in your path variable so that you can invoke it from any folder. The full path to the folder will depend on your edition of Visual Studio. I’m using the Community version. If you are running the Professional version, then replace the folder name “Community” with “Professional” below.

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator

With it added to your path, the storage emulator will only try to create files in what your current directory is.


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.