Download

Access Denied on Build

Hey guys!

Following through the tutorial for building the UE4 source code. Grabbed VS2013 Express (I have a student edition of VS2012, but everything seems to say 2013 is needed). When I go to build, I get the DOS window for about 30-40 seconds, then a message saying ‘Access Denied’, and the build stops and does not complete.

I’ve got administrator on my machine, although this is my first time using GitHub to grab code like this. Does anyone have any ideas?

Hi DakSevlda,

Did you make sure to link your unreal engine account to your github account? You can do so on the unreal engine account page by typing in your github account name in the box shown.

Thank you and have a great day,
Adam

Yes I did, at least I believe so. I have the UE4 source forked to myself and I’m able to see it all so I believe so. I’ll double check!

Doubled checked. My Github is daksevkla, and that is tied into my UE4 account over at https://www.unrealengine.com/settings

What I believe is happening is that the Unreal Build Tool (UBT) is trying to clean some of your existing binaries/dlls and is having trouble doing so (access denied deleting/touching a file). Could be because the files are write protected or because they are in use (editor running or something like that).

I’m not sure which files they would be, but typically ones in the Engine\Binaries\ or MyGame\Binaries directory structures.

That would make sense, I wasn’t certain what it was trying to touch that may be set as read-only. I have the source on g:\GitHub\UnrealEngine4, and the actual Editor over on h:\UnrealEngine4. I think I had the engine up and downloading when I was trying to build, I didn’t think it would affect it like that. I’ll try it out tonight on a fresh restart without opening anything but VS2013! I’ll have to make sure there aren’t any Read-Only files there too. Thanks for the help!

Could it also be because I had the GitHub client open perhaps? That’s where it grabbed all the files from. Not sure if GitHub auto updates if anything comes across new? I thought I’d cloned out my Fork but I could’ve screwed something up there too.

It shouldn’t matter whether you cloned from out of your own fork or not. The code is all local on your machine, so there should be no issues related to that.

Most likely you need to run Visual Studio with Admin priviledges, so it can touch/edit/delete any files it needs to.

1 Like

Try to close all the programs that might affect your files/dependencies even the GitHub client, yes (I don’t use it, so I don’t know about it). Try restarting to clean any possible leaks or open processes that might prohibit you from touching those files.

No luck. Rebooted, ran nothing else, here’s my error :

1>------ Build started: Project: UnrealBuildTool, Configuration: Development Any CPU ------
1> UnrealBuildTool → H:\Game Design\GitHub\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool.exe
2>------ Build started: Project: UE4, Configuration: Development_Editor x64 ------
2> Building UnrealHeaderTool…
2>EXEC : error : System.ComponentModel.Win32Exception (0x80004005): Access is denied
2> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
2> at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
2> at UnrealBuildTool.ExternalExecution.RunExternalExecutable(String ExePath, String Commandline) in h:\Game Design\GitHub\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\System\ExternalExecution.cs:line 316
2> at UnrealBuildTool.ExternalExecution.ExecuteHeaderToolIfNecessary(UEBuildTarget Target, List`1 UObjectModules, String ModuleInfoFileName) in h:\Game Design\GitHub\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\System\ExternalExecution.cs:line 390
2> at UnrealBuildTool.UEBuildTarget.Build() in h:\Game Design\GitHub\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 1383
2> at UnrealBuildTool.UnrealBuildTool.RunUBT(String] Arguments) in h:\Game Design\GitHub\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\System\UnrealBuildTool.cs:line 1040
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command “…\Build\BatchFiles\Build.bat UE4Editor Win64 Development” exited with code -1.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

No other users on my machine, log in to the only Administrator user. Any ideas?

Figured it out. Latest update of Avast! is apparently blocking any code from compiling or running. Seriously? Uninstalled and it’s working fine now. Crazy. Guess it’s back to MSE!

Yup that is correct for me as well. I had to disable the Premier Avast before I could run a build on UE4 4.4.3 release. Come on Avast this is way to aggressive a step. It also put the 4.5 preview version into the chest as it saw it as a maleware like program.

WTF!!! :confused:

Yes, i have a lot of issues with avast hating and moving UBT to virus chest and stuff :confused: i really wish they would update avast and fix it triggering off of UE4 builds, but as a fix in the mean time, i whitelisted all of my UE4 dev folders, and since have not had issues

I’d like to up your answer, since it fixed this problem here. Disabling antivirus altogether didn’t change anything, but running VS2019 as administrator (eg, right click & “Run as administrator”, not sure if it results in same ACL as being logged as admin) did.

Security policies of Windows are a pain.