Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission error when Jupyterhub user launches Julia #1058

Closed
BouarfaMahi opened this issue Nov 5, 2022 · 2 comments
Closed

Permission error when Jupyterhub user launches Julia #1058

BouarfaMahi opened this issue Nov 5, 2022 · 2 comments

Comments

@BouarfaMahi
Copy link

BouarfaMahi commented Nov 5, 2022

Os: Ubuntu 22.04.1 LTS
Jupyterhub 3.0.0 as a service.

quant@devbox:~$ julia
ERROR: SystemError: opening file "/opt/julia-1.8.2/share/julia/logs/repl_history.jl": Permission denied
Stacktrace:
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:176
[2] #systemerror#80
@ ./error.jl:175 [inlined]
[3] systemerror
@ ./error.jl:175 [inlined]
[4] open(fname::String; lock::Bool, read::Bool, write::Bool, create::Bool, truncate::Nothing, append::Nothing)
@ Base ./iostream.jl:293
[5] setup_interface(repl::REPL.LineEditREPL, hascolor::Bool, extra_repl_keymap::Any)
@ REPL /opt/julia-1.8.2/share/julia/stdlib/v1.8/REPL/src/REPL.jl:997
[6] setup_interface(repl::REPL.LineEditREPL; hascolor::Bool, extra_repl_keymap::Any)
@ REPL /opt/julia-1.8.2/share/julia/stdlib/v1.8/REPL/src/REPL.jl:908
[7] setup_interface
@ /opt/julia-1.8.2/share/julia/stdlib/v1.8/REPL/src/REPL.jl:908 [inlined]
[8] (::Pkg.var"#4#5")(repl::REPL.LineEditREPL)
@ Pkg /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Pkg.jl:660
[9] __atreplinit(repl::REPL.LineEditREPL)
@ Base ./client.jl:368
[10] #invokelatest#2
@ ./essentials.jl:729 [inlined]
[11] invokelatest
@ ./essentials.jl:726 [inlined]
[12] _atreplinit
@ ./client.jl:375 [inlined]
[13] (::Base.var"#967#969"{Bool, Bool, Bool})(REPL::Module)
@ Base ./client.jl:418
[14] #invokelatest#2
@ ./essentials.jl:729 [inlined]
[15] invokelatest
@ ./essentials.jl:726 [inlined]
[16] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
@ Base ./client.jl:404
[17] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:318
[18] _start()
@ Base ./client.jl:522


Notebook

ENV["IJULIA_DEBUG"]=true
Pkg.build("IJulia")

Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/6e47d11ea2776bc5627421d59cdcc1296c058071/build.log`
Building IJulia → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/98ab633acb0fe071b671f6c1785c46cd70bb86bd/build.log`

Error building IJulia:
[ Info: Installing Julia kernelspec in /home/quant/.local/share/jupyter/kernels/julia-1.8
ERROR: LoadError: SystemError: opening file "deps.jl": Permission denied
Stacktrace:
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:176
[2] #systemerror#80
@ ./error.jl:175 [inlined]
[3] systemerror
@ ./error.jl:175 [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:356
[6] open(fname::String, mode::String)
@ Base ./iostream.jl:355
[7] open(::Base.var"#383#384"{String, Tuple{}}, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:382
[8] open
@ ./io.jl:381 [inlined]
[9] write
@ ./io.jl:448 [inlined]
[10] write_if_changed(filename::String, contents::String)
@ Main /opt/julia-1.8.2/share/julia/packages/IJulia/AQu2H/deps/build.jl:35
[11] top-level scope
@ /opt/julia-1.8.2/share/julia/packages/IJulia/AQu2H/deps/build.jl:44
[12] include(fname::String)
@ Base.MainInclude ./client.jl:476
[13] top-level scope
@ none:5
in expression starting at /opt/julia-1.8.2/share/julia/packages/IJulia/AQu2H/deps/build.jl:44

Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
[2] (::Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String})()
@ Pkg.Operations /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1060
[3] withenv(::Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, ::Pair{String, String}, ::Vararg{Pair{String}})
@ Base ./env.jl:172
[4] (::Pkg.Operations.var"#107#112"{String, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.PackageSpec})()
@ Pkg.Operations /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1619
[5] with_temp_env(fn::Pkg.Operations.var"#107#112"{String, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.PackageSpec}, temp_env::String)
@ Pkg.Operations /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1493
[6] (::Pkg.Operations.var"#105#110"{Dict{String, Any}, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String})(tmp::String)
@ Pkg.Operations /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1582
[7] mktempdir(fn::Pkg.Operations.var"#105#110"{Dict{String, Any}, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String}, parent::String; prefix::String)
@ Base.Filesystem ./file.jl:764
[8] mktempdir(fn::Function, parent::String) (repeats 2 times)
@ Base.Filesystem ./file.jl:760
[9] sandbox(fn::Function, ctx::Pkg.Types.Context, target::Pkg.Types.PackageSpec, target_path::String, sandbox_path::String, sandbox_project_override::Pkg.Types.Project; preferences::Dict{String, Any}, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
@ Pkg.Operations /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1540
[10] build_versions(ctx::Pkg.Types.Context, uuids::Set{Base.UUID}; verbose::Bool)
@ Pkg.Operations /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1041
[11] build(ctx::Pkg.Types.Context, uuids::Set{Base.UUID}, verbose::Bool)
@ Pkg.Operations /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:898
[12] build(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; verbose::Bool, kwargs::Base.Pairs{Symbol, IJulia.IJuliaStdio{Base.PipeEndpoint}, Tuple{Symbol}, NamedTuple{(:io,), Tuple{IJulia.IJuliaStdio{Base.PipeEndpoint}}}})
@ Pkg.API /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:1029
[13] build(pkgs::Vector{Pkg.Types.PackageSpec}; io::IJulia.IJuliaStdio{Base.PipeEndpoint}, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
[14] build(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:145
[15] #build#99
@ /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[16] build
@ /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[17] #build#98
@ /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:143 [inlined]
[18] build(pkg::String)
@ Pkg.API /opt/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:143
[19] top-level scope
@ In[4]:2
[20] eval
@ ./boot.jl:368 [inlined]
[21] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1428

@fredrikekre
Copy link
Member

You need to make sure that the first entry in DEPOT_PATH is writeable for users.

@BouarfaMahi
Copy link
Author

thanks @fredrikekre, it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants