Problem with reading files in python

Stephen Quinney <[email protected]>
Newsgroups gmane.comp.file-systems.openafs.general
Message-ID <CAJ+y7SwLgq31UbdsVdrh8NyQtsmrzt68dPrsNdG1CY8PMh3_dQ@mail.gmail.com>
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?


Thanks,

Stephen Quinney
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.