# Pkg can not create Manifest.toml as "nt authority\\system" user account on Windows

**URL:** <https://discourse.julialang.org/t/pkg-can-not-create-manifest-toml-as-nt-authority-system-user-account-on-windows/68452>\
**Category:** General Usage\
**Tags:** question, package-manager\
**Created:** [September 20, 2021, 11:12am UTC](https://discourse.julialang.org/t/pkg-can-not-create-manifest-toml-as-nt-authority-system-user-account-on-windows/68452 "2021-09-20T11:12:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [September 20, 2021, 11:12am UTC](https://discourse.julialang.org/t/pkg-can-not-create-manifest-toml-as-nt-authority-system-user-account-on-windows/68452/1 "2021-09-20T11:12:10Z")

</div>

Hi All 🙂

I run into a very wired error. It only happens while using Julia as system-user on Windows.

Let me explain what I’m doing:  
1.) Created an project with the following structure:  
/my\_project  
/my\_project/start.jl  
/my\_project/Project.toml  
/my\_project/src/MyProject.jl

The following lines are in `start.jl`:

```julia
using Pkg
Pkg.activate(@ __DIR__ )
Pkg.instantiate()

```

2.) Start Julia REPL as “nt authority\system”:  
Here I use “PSTools”.

```julia
cmd> PsExec64.exe -s -i julia

```

Now I can see if I’m “nt authority\system”

```julia
julia>;
shell> whoami
nt authority\system

```

3.) Include the `start.jl` file:  
After that the following error occurs

```julia
ERROR: LoadError: SystemError: opening file "my_project\\Project.toml": Permission denied
Stacktrace:
 [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
   @ Base .\error.jl:168
 [2] #systemerror#62
   @ .\error.jl:167 [inlined]
 [3] systemerror
   @ .\error.jl:167 [inlined]
 [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing)
   @ Base .\iostream.jl:293
 [5] open(fname::String, mode::String; lock::Bool)
   @ Base .\iostream.jl:355
 [6] open(fname::String, mode::String)
   @ Base .\iostream.jl:355
 [7] open(::Base.var"#322#323"{String, Tuple{}}, ::String, ::Vararg{String, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Base .\io.jl:328
 [8] open
   @ .\io.jl:328 [inlined]
 [9] write
   @ .\io.jl:420 [inlined]
[10] write_project
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:178 [inlined]
[11] write_project
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:169 [inlined]
[12] write_project(env::Pkg.Types.EnvCache)
   @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:167
[13] #write_env#106
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1399 [inlined]
[14] write_env
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1399 [inlined]
[15] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel)
   @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1320
[16] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:254
[17] #up#39
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:77 [inlined]
[18] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_autoprecomp::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1291
[19] instantiate
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1276 [inlined]
[20] #instantiate#246
   @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1272 [inlined]
[21] instantiate()
   @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1272
[22] top-level scope
   @ my_project\start.jl:4
n expression starting at my_project\start.jl:4

```

Can anybody reproduce that error? How can I fix it?

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [September 21, 2021, 2:33pm UTC](https://discourse.julialang.org/t/pkg-can-not-create-manifest-toml-as-nt-authority-system-user-account-on-windows/68452/2 "2021-09-21T14:33:58Z")

</div>

The file I’m trying to touch was on a network drive and I had no permission…
