Search Unity

file access denied

Discussion in 'Editor & General Support' started by negative Z3R0, Jan 5, 2014.

  1. negative Z3R0

    negative Z3R0

    Joined:
    Dec 21, 2013
    Posts:
    9
    Internal compiler error. See the console log for more information. output was:
    Unhandled Exception: System.UnauthorizedAccessException: Access to the path "C:\Users\Douglas\Documents\New Unity Project\Temp\Assembly-CSharp-firstpass.dll.mdb" is denied.

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in <filename unknown>:0

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in <filename unknown>:0

    at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in <filename unknown>:0

    at Mono.CSharp.SymbolWriter+SymbolWriterImpl.WriteSymbolFile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.SymbolWriter.WriteSymbolFile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.CodeGen.Save (System.String name, Boolean saveDebugInfo, Mono.CSharp.Report Report) [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0


    is there a way to fix this? I really don't understand..
    Thank you for any help
     
  2. Sir-Tiddlesworth

    Sir-Tiddlesworth

    Joined:
    Oct 19, 2011
    Posts:
    908
    Try running unity as an administrator.
     
  3. negative Z3R0

    negative Z3R0

    Joined:
    Dec 21, 2013
    Posts:
    9
    I tried and it still showed me the message . I run windows 8.1 on a 64 bit computer if that can help... When i restart the PC unity works for a while but then gives me the same message and i do not like restarting my computer every 15 minutes.
     
  4. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Try turning off your virus software. I had to turn off the real time scanning when I started getting that error.
     
    HearsAWho, 8as8all1000 and clincha like this.
  5. negative Z3R0

    negative Z3R0

    Joined:
    Dec 21, 2013
    Posts:
    9
    It works fine now. Thanks!
     
    Last edited: Jan 6, 2014
  6. 8as8all1000

    8as8all1000

    Joined:
    Oct 25, 2014
    Posts:
    1
  7. GameDeva

    GameDeva

    Joined:
    Dec 5, 2014
    Posts:
    2
    THANKYOUUUU :D
     
  8. Isidore

    Isidore

    Joined:
    Dec 18, 2014
    Posts:
    1
    Running as admin worked. Thanks:)
     
  9. DaBestEva123

    DaBestEva123

    Joined:
    Jun 28, 2015
    Posts:
    1
    I am 13 and have the same problem. I ask my mother if she can and said where i got the solution from, and she says "Well it must not be a very good site, no-one turns their virus checker off" -facepalm- are there any other solutions that don't include doing so?
     
  10. Deleted User

    Deleted User

    Guest

    you can make a change in your script, like adding a space at the end (a change that doesnt affect the code), then save the changes and the error should go away. you might have to do it more than once sometimes. and you dont need to turn off you mcafee real time scanning either.
     
    dhairyek likes this.
  11. occak

    occak

    Joined:
    Aug 25, 2015
    Posts:
    2
    And how would a mac user go about this? I'm having the exact same problem [UnauthorizedAccessException: Access to the path "/Users/myName/.local" is denied.] but I can't see any 'run as administrator' option?
     
    RGV likes this.
  12. occak

    occak

    Joined:
    Aug 25, 2015
    Posts:
    2
    ok apparently entering the command sudo /Applications/Unity/Unity.app/Contents/MacOS/Unity in the terminal starts Unity from the root. Now I need to add this somewhere in bash_profile so that i don't have to do it every time I run the application
     
  13. RGV

    RGV

    Joined:
    Jan 25, 2016
    Posts:
    48
    Absolutly genius! Thanks!!!
     
  14. Deleted User

    Deleted User

    Guest

    your welcome, glad I could finally help someone :)
     
  15. nuttyapps

    nuttyapps

    Joined:
    Mar 14, 2015
    Posts:
    1
    I am so stupid i have been creating file and before there i created folder of the same name and it gave me this message as well. :D :S Sometimes S*** happens :D
     
  16. psbgames22

    psbgames22

    Joined:
    Dec 28, 2018
    Posts:
    3
    - Go to file and cut & past the file some where else.
    - Then press the try again button.
    - Again past that file to the privious path.
    - Now, when you press try again key; unity start running.
     
    anisimovdev likes this.
  17. ExpressAlles

    ExpressAlles

    Joined:
    Mar 28, 2019
    Posts:
    1
    Another workaround that did the trick for me was to just remove the script component from the game object in the inspector and then put the script component right back.

    Rebooting and making minor changes to the script did not work for me but removing and then re-adding the script component worked in Unity 2019.2.13f1.
     
  18. ahmetala

    ahmetala

    Joined:
    Mar 9, 2019
    Posts:
    1
    change the path of the building place
     
  19. Om245

    Om245

    Joined:
    Oct 4, 2022
    Posts:
    1
    Thanks so much
    I ran unity hub as administrator
    and its works