# Global JULIA\_PKGDIR but install packages locally

**URL:** <https://discourse.julialang.org/t/global-julia-pkgdir-but-install-packages-locally/11857>\
**Category:** General Usage\
**Created:** [June 21, 2018, 3:09pm UTC](https://discourse.julialang.org/t/global-julia-pkgdir-but-install-packages-locally/11857 "2018-06-21T15:09:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![madprogrammer](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@madprogrammer](https://discourse.julialang.org/u/madprogrammer)\
**Post date:** [June 21, 2018, 3:09pm UTC](https://discourse.julialang.org/t/global-julia-pkgdir-but-install-packages-locally/11857/1 "2018-06-21T15:09:02Z")

</div>

Hi all,

I wanted to see if I could have the following configuration in Julia in regards to the package structure.

The goal is to have julia and the package source code installed into a directory mounted on a NFS mounted drive. The julia installation works perfectly fine, except now I’m running into issues with attempting to share packages between users. I’ve set up a packages directory called ‘packages/v0.6’ that has all the source code and the JULIA\_PKGDIR environment variable points to ‘packages’. The issue is now that the packages will compile to this shared ‘packages/lib/v0.6’ which has rw permissions for user only.

A solution I’m looking for is maybe looking for the packages in this ‘packages/v0.6’ directory and installing them into a users home folder. From what I understand, the permissions of the compiled modules being 600 are within the Julia code and for a reason I’m unsure of.

Edit: I should note that I’m using Julia 0.6.2

---

<div class="post-metadata">

**Author:** ![madprogrammer](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@madprogrammer](https://discourse.julialang.org/u/madprogrammer)\
**Post date:** [June 26, 2018, 8:39pm UTC](https://discourse.julialang.org/t/global-julia-pkgdir-but-install-packages-locally/11857/2 "2018-06-26T20:39:37Z")

</div>

Any ideas on this?

---

<div class="post-metadata">

**Author:** ![samtkaplan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/samtkaplan/32/2000_2.png) [@samtkaplan](https://discourse.julialang.org/u/samtkaplan)\
**Post date:** [June 26, 2018, 8:56pm UTC](https://discourse.julialang.org/t/global-julia-pkgdir-but-install-packages-locally/11857/3 "2018-06-26T20:56:03Z")

</div>

You can use the `Base.LOAD_CACHE_PATH` for this. In other words, each user can have there own folder with their own .ji files. See also:

> [@LOAD\_CACHE\_PATH](https://discourse.julialang.org/t/load-cache-path/8950/2):
>
> To change the cache path run Base.LOAD\_CACHE\_PATH[1] = "/path/to/cache" Note that by default the cache path is ~/.julia/lib/version. If you want to set it automatically add the command to either ~/.juliarc.jl (for just you) or julia\_install\_dir/etc/julia/juliarc.jl (for all users). The following command will set it to the default folder in the users home directory. Base.LOAD\_CACHE\_PATH[1] = string(ENV["HOME"],"/.julia/lib/v",VERSION.major,".",VERSION.minor)
