Folder permissions in Metadata


#1

I am looking for help setting up a Julia environment on windows 10.

I recently uninstalled and reinstalled Julia. It was working earlier but upgrading to 6.2 has caused issues.

Julia downloads properly, and the console works well. When I try to get a package directory using Pkg.init, it does something odd. In my v0.6 folder located in .julia I have two folders.

\jl_1FAC.tmp
\METADATA

It then ends with an error that says that removing a directory fails. When I try to delete the jl_1FAC.tmp file it tells me I don’t have permission to delete it. METADATA is full of folders for all the registered Julia packages. Inside of jl_1FAC.tmp is the following.

  • Another METADATA, full of all the correct foders
  • A file called META_BRANCH
  • a REQUIRE file.

When I try to add a package, I get the following error.

ERROR: GitError(Code:ENOTFOUND, Class:Repository, Could not find repository from 'METADATA')

A clean reinstall does not fix these issues. Often, I do not have permission to delete the jl_1FAC.tmp (which changes names, jl_RandomAlphanumerics.tmp) file or the .julia file as a whole. When I am able to delete it, running Pkg.init() gives the same errors.

What seems to be going on is that Julia creates all these file in .julia, but it does it with a different set of permissions than it has when it needs to delete files? When it realizes it can’t make edits in the main METADATA folder, it creates a temprary one, like the process described in this stackoverflow post.

I think my Windows machine has larger issues with file permissions. However I want to check that other people aren’t having similar problems. Any help is appreciated, thank you.

xpost as an issue at github here Issue 17994