[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

Andreas Krüger report at bugs.python.org
Sat Oct 28 10:13:09 EDT 2017


Andreas Krüger <pkydtbegt at famsik.de> added the comment:

I can easily reproduce the problem with Docker,
and it does seem to be a permission problem:

    $ docker run -ti --rm --user="7777:7777" python:3.6.3-jessie bash -c "python3"
    Python 3.6.3 (default, Oct 10 2017, 02:29:16) 
    [GCC 4.9.2] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    Error in atexit._run_exitfuncs:
    PermissionError: [Errno 13] Permission denied

    $ docker run -ti --rm --user="7777:7777" python:3.6.3-jessie bash -c "HOME=/tmp python3; ls -lta /tmp"
    Python 3.6.3 (default, Oct 10 2017, 02:29:16) 
    [GCC 4.9.2] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    total 8
    drwxrwxrwt  2 root root 4096 Oct 28 14:10 .
    drwxr-xr-x 55 root root 4096 Oct 28 14:10 ..
    -rw-------  1 7777 7777    0 Oct 28 14:10 .python_history

----------
nosy: +dj3ei
versions: +Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19891>
_______________________________________


More information about the Python-bugs-list mailing list