*export XDG_RUNTIME_DIR=""*

On Sunday, 5 June 2016 15:21:42 UTC+5:30, Dij Maha wrote:
>
> Hi All! 
> I have a problem in running jupyter notebook: 
> If I run jupyter notebook without being root I get 
>
>> PermissionError: [Errno 13] Permission denied: '/run/user/0/jupyter'
>>
>
> The problem occurs when I try to work with Jupyter on a VPS. I tried also 
> with  different distributions: both Ubuntu Server and Arch Linux, and both 
> gives the same error. On the other hand root user doesn't show this issue, 
> but I don't feel really safe to run the notebook server as super user!
>
> I have noticed that on my laptop jupyter works perfectly well since when 
> it starts, it writes on the  `/run/user/1000/` directory that is actually 
> owned by the user itself. So no issues with permissions. (Unfortunately, I 
> cannot simply change the owner of the idrectory /run/user/0/jupyter since 
> it is a temporary dir and is deleted when i close the notebook)
> Is it possible to change the default directory? Is there any reason why it 
> choose the /0/ directory that should belong to root? Do the user that run 
> the notebook have to be in a particular group? 
>
> Thanks in advance for any suggestion!
> D
>
> P.S.  Th jupyter version are both on my server and laptop: 
> jupyter 4.1.0-4 
> jupyter-notebook 4.2.0-1 
> python-ipykernel 4.3.1-1
>
> The Error:
>
> Traceback (most recent call last):
>>   File "/usr/lib/python3.5/site-packages/traitlets/traitlets.py", line 
>> 501, in get
>>     value = obj._trait_values[self.name]
>> KeyError: 'runtime_dir'
>>
>> During handling of the above exception, another exception occurred:
>>
>> Traceback (most recent call last):
>>   File "/usr/bin/jupyter-notebook", line 6, in <module>
>>     main()
>>   File "/usr/lib/python3.5/site-packages/jupyter_core/application.py", 
>> line 267, in launch_instance
>>     return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
>>   File 
>> "/usr/lib/python3.5/site-packages/traitlets/config/application.py", line 
>> 595, in launch_instance
>>     app.initialize(argv)
>>   File "<decorator-gen-7>", line 2, in initialize
>>   File 
>> "/usr/lib/python3.5/site-packages/traitlets/config/application.py", line 
>> 74, in catch_config_error
>>     return method(app, *args, **kwargs)
>>   File "/usr/lib/python3.5/site-packages/notebook/notebookapp.py", line 
>> 1058, in initialize
>>     self.init_configurables()
>>   File "/usr/lib/python3.5/site-packages/notebook/notebookapp.py", line 
>> 838, in init_configurables
>>     connection_dir=self.runtime_dir,
>>   File "/usr/lib/python3.5/site-packages/traitlets/traitlets.py", line 
>> 529, in __get__
>>     return self.get(obj, cls)
>>   File "/usr/lib/python3.5/site-packages/traitlets/traitlets.py", line 
>> 508, in get
>>     value = self._validate(obj, dynamic_default())
>>   File "/usr/lib/python3.5/site-packages/jupyter_core/application.py", 
>> line 99, in _runtime_dir_default
>>     ensure_dir_exists(rd, mode=0o700)
>>   File "/usr/lib/python3.5/site-packages/ipython_genutils/path.py", line 
>> 167, in ensure_dir_exists
>>     os.makedirs(path, mode=mode)
>>   File "/usr/lib/python3.5/os.py", line 241, in makedirs
>>     mkdir(name, mode)
>> PermissionError: [Errno 13] Permission denied: '/run/user/0/jupyter'
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/286b23c1-3ea9-41e2-8a26-c9134413b248%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to