Permission being denied by IntelliJ?
Hi,
IntelliJ tried to refresh my gradle project after importing, and this error is shown.
```
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
/Users/chandana.bhat@in.ibm.com/Documents/Programming/Java/FRC/Basebot-Code/.gradle/4.9/fileHashes/fileHashes.lock (Permission denied)
```
However, doing ```sudo gradle build``` in the root directory of the project builds successfully. Any ideas as to what might be causing this?
Please sign in to leave a comment.
Have you checked that the user who runs IDE has r/w permissions to the directory and the files?
Also some other process may hold a lock on the file leading to this error when IDE tries to build. Does build from command line without sudo work?
Try also restarting the PC.