[OpenAFS] Problem with reading files in python

Stephen Quinney stephen@jadevine.org.uk
Mon, 27 Jun 2022 14:21:05 +0100

I have a slightly puzzling issue with Python, I am trying to open a
ISO file that is stored in AFS. in binary mode just for reading.

I have read permission on the directory but not write:

% fs listacl foo
Access list for foo is
Normal rights:
  system:administrators rlidwka
  squinney rl

If I open the file as normal (i.e. text mode) it works fine but when I
attempt to use binary mode I get permission denied.

% python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> open("foo/example.iso")
<_io.TextIOWrapper name='foo/example.iso' mode='r' encoding='UTF-8'>
>>> open("foo/example.iso",mode="r+b")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
PermissionError: [Errno 13] Permission denied: 'foo/example.iso'

If I copy the directory to a local filesystem it all works as
expected. What am I missing here?


Stephen Quinney