# System.UnauthorizedAccessException: Access to the path '7996'... What is this?

**URL:** <https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893>\
**Category:** Plugins\
**Tags:** error-building, exception, unreal-engine, Plugins, question, CPP\
**Created:** [April 20, 2016, 11:03pm UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893 "2016-04-20T23:03:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BagNTag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BagNTag](https://forums.unrealengine.com/u/BagNTag)\
**Post date:** [April 20, 2016, 11:03pm UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893/1 "2016-04-20T23:03:32Z")

</div>

I’m in the process of learning how to make plugins. So beginning with the tutorials online I’ve hit a road block.

**When re-building the project**

_C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(42,5): error MSB3075: The command ““C:\apps\Epic Games\4.11\Engine\Build\BatchFiles\Rebuild.bat” {some .cs file} Win64 Development “D:\Users…\Desktop…uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command._

**When building the project**

_C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command ““C:\apps\Epic Games\4.11\Engine\Build\BatchFiles\Build.bat” {some .cs file} Win64 Development “D:\Users…\Desktop…uproject” -waitmutex” exited with code -1._

**Done so far:**

- Reinstalled Unreal Engine (4.11.2)
- Reset Visual Studio (2015) to default settings
- Ran Unreal Engine and Visual Studio with admin rights

How to fix this error?

---

<div class="post-metadata">

**Author:** ![BagNTag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BagNTag](https://forums.unrealengine.com/u/BagNTag)\
**Post date:** [April 20, 2016, 11:08pm UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893/2 "2016-04-20T23:08:13Z")

</div>

I managed to solve this issue and thought I would post it.

Steps:

1. Go to C:\apps
2. Right click “Epic Games”
3. Under the General tab, unselect “Read-only”
4. Hit apply
5. Open the visual studio project and build/rebuild

Hope it helps

---

<div class="post-metadata">

**Author:** ![Aizenhar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aizenhar](https://forums.unrealengine.com/u/Aizenhar)\
**Post date:** [May 10, 2016, 12:29am UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893/3 "2016-05-10T00:29:08Z")

</div>

It worked for me…  
[https://answers.unrealengine.com/questions/295689/unreal-engine-49-cant-build-source-when-editor-is.html](https://answers.unrealengine.com/questions/295689/unreal-engine-49-cant-build-source-when-editor-is.html)

---

<div class="post-metadata">

**Author:** ![Rockeaters](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rockeaters](https://forums.unrealengine.com/u/Rockeaters)\
**Post date:** [August 25, 2017, 1:12pm UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893/4 "2017-08-25T13:12:26Z")

</div>

This did the trick for me, somehow after adding the source to my perforce folder, the folder changed to Read only.

So just select your source folder =\> Right Click =\> Properties =\> Unselect read only =\> Build

---

<div class="post-metadata">

**Author:** ![alto\_andre](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alto\_andre](https://forums.unrealengine.com/u/alto_andre)\
**Post date:** [November 9, 2020, 5:49am UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893/5 "2020-11-09T05:49:06Z")

</div>

Thanks for the tip!  
In may case, it worked after unchecking the read-only from the Binaries folder.

---

<div class="post-metadata">

**Author:** ![d1khoofdige](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@d1khoofdige](https://forums.unrealengine.com/u/d1khoofdige)\
**Post date:** [June 22, 2021, 1:08pm UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893/6 "2021-06-22T13:08:48Z")

</div>

Thanks, unticking Binaries folder works.

---

<div class="post-metadata">

**Author:** ![alzosmol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alzosmol](https://forums.unrealengine.com/u/alzosmol)\
**Post date:** [November 22, 2023, 9:35pm UTC](https://forums.unrealengine.com/t/system-unauthorizedaccessexception-access-to-the-path-7996-what-is-this/354893/7 "2023-11-22T21:35:13Z")

</div>

alternatively you can set the shortcut to run editor as admin  
 ![Screenshot_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/5/435f241ff2bfb729f14358486592559569819320.png)

 ![Screenshot_3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/9/8b98c17a53f3c998836270082cc7712b6aea4915.jpeg)  
 ![Screenshot_4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/8/7e88eab2177d09fd53bf7d976539f772b30b0496.jpeg)  
 ![Screenshot_6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/4/3243191577a3593e2010c6908bae296e8f3266c4.png)
