Shared Julia environment

I’m trying to build Julia to be used by a group of developers. I’m work with v1.0 and have a Linux group associated with the developers, so I would like each member of the group to be able to use Julia and install packages (it is a small group and we trust each other).

Steps I’ve taken:

  1. Unzipped Julia in a shared folder
  2. Used $JULIA_DEPOT_PATH to point to a shared folder so Julia doesn’t try an install packages in ~/.julia. This seems to be working
  3. installed a few packages including CMake
  4. chgrp -R (now all of Julia should be part of the group)
  5. chmod -R g=u (now group permissions should mirror user)
  6. chmod -R g+s (now files made in sub-directories should inherit the group property)
  7. run Julia and execute “status” in the package manager.

I’ve made sure that the other users have set up their environment (exporting the $JULIA_DEPOT_PATH variable) exactly the same as me. Step 7 works fine for me, but other group members get the following error:

(v1.0) pkg> status
ERROR: IOError: futime: operation not permitted (EPERM)
Stacktrace:
 [1] uv_error at ./libuv.jl:85 [inlined]
 [2] futime at ./filesystem.jl:143 [inlined]
 [3] touch(::String) at ./file.jl:407
 [4] write_env_usage(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:424
 [5] Pkg.Types.EnvCache(::Nothing) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:306
 [6] Type at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:285 [inlined]
 [7] Type at ./none:0 [inlined]
 [8] Context!(::Array{Pair{Symbol,Any},1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:367
 [9] Context! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:497 [inlined]
 [10] do_status!(::Dict{Symbol,Any}, ::Array{String,1}, ::Dict{Symbol,Any}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:569
 [11] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:686
 [12] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:685
 [13] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:542
 [14] #do_cmd#30(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:507
 [15] do_cmd at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:503 [inlined]
 [16] (::getfield(Pkg.REPLMode, Symbol("##41#44")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:842
 [17] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [18] invokelatest at ./essentials.jl:685 [inlined]
 [19] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2261
 [20] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
 [21] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
 [22] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [23] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [24] invokelatest at ./essentials.jl:685 [inlined]
 [25] macro expansion at ./logging.jl:308 [inlined]
 [26] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [27] exec_options(::Base.JLOptions) at ./client.jl:242
 [28] _start() at ./client.jl:421

I can’t really figure out what file is causing the error. If anybody has any advice I would greatly appreciate it.

2 Likes

Have you checked to see if the people who are getting the errors can manually run touch on <depot_path>/logs/manifest_usage.toml without getting errors?

I.e. what happens on $ touch <depot_path>/logs/manifest_usage.toml ?

touching the toml files works fine for them. They can grep through every file in both the julia folder and <depot_path> without permission errors.

Update: The issue seems to have been solved by copying the files at <JULIA_DEPOT_PATH> for each user. That is to say that a user must be the owner of <JULIA_DEPOT_PATH> in order to use the Julia environment located there. The user does not need to own the base Julia executable.

This seems like a bug.

1 Like

Ah, I think you are correct. I checked julia’s current issues and it seems like this issue is the source of the bug. I don’t think the package manager can do anything about it until this issue is resolved.

Thanks for pointing this out. I will stick with the work around until this gets fixed.

Hey I’m wondering if there is any update on the issue…

We ran into the same issue of building up Julia (with packages) in a shared environment. While the main program of Julia works well, the users do not have access to the installed packages since they are not the owner of that folder (and they should not be)…