Author Anthony Sottile
Recipients Anthony Sottile, dj3ei, ejo, pitrou, r.david.murray, vajrasky
Date 2018-07-26.15:56:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1532620596.7.0.56676864532.issue19891@psf.upfronthosting.co.za>
In-reply-to
Content
I was able to reproduce both the `PermissionError` and the `FileNotFoundError` under these circumstances:

$ docker run --user 123:123 -ti python python
Python 3.7.0 (default, Jul 17 2018, 11:04:33) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Error in atexit._run_exitfuncs:
PermissionError: [Errno 13] Permission denied


$ docker run --user nobody -ti python python
Python 3.7.0 (default, Jul 17 2018, 11:04:33) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Error in atexit._run_exitfuncs:
FileNotFoundError: [Errno 2] No such file or directory


In the former, the home directory is `/` (not writable).  In the latter, the homedir is `/nonexistent`, which, well, doesn't exist.

My patch addresses both of these errors.
History
Date User Action Args
2018-07-26 15:56:36Anthony Sottilesetrecipients: + Anthony Sottile, pitrou, r.david.murray, ejo, vajrasky, dj3ei
2018-07-26 15:56:36Anthony Sottilesetmessageid: <1532620596.7.0.56676864532.issue19891@psf.upfronthosting.co.za>
2018-07-26 15:56:36Anthony Sottilelinkissue19891 messages
2018-07-26 15:56:36Anthony Sottilecreate