In Python 3.6, when I attempt to "open('foobar', "r+b") with a file whose permissions are '-r--r--r--' (in CentOS7), I get a permission failure:
"builtins.PermissionError: [Errno 13] Permission denied: 'full/path/to/foobar'"
It opens just fine with "r", and the "r+b" works just fine if the permissions are '-rw-rw-rw-'.
I do need to open these files read-only, I'd like them to have read-only protections in the directory (so that they aren't inadvertently changed by other code), and I do need to read them as binaries. Is this a feature/bug of Python 3.6?
I'd like to know if I'm doing something incorrect, or if there's some work-around if not. I'd really like to avoid upgrading to 3.8 right now.
You are using the + mode, which is trying to open the file for update. Try without the + and it should work.
Per the help:

'+'       open a disk file for updating (reading and writing)
Python 3.6 fails to open read-only file using "r+b" mode