fedora-python / fedora-python/tox-github-action

Unable to set file as unreadable inside tox container

Đang mở
#30 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
17
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I have a Python module that relies on setting permissons to a file as unreadable.

Unfortunately, it looks like this is not possible inside the tox container.

Here's the minimal reproducer : https://github.com/matthew-brett/test-actions/blob/main/tox.ini

In particular, I have this test in my `tox.ini` file:

```
touch unreadable
python -c "import os; os.chmod('unreadable', 0o200)"
python -c "open('unreadable', 'rb').read()"
```

Obviously the last line should cause a `Permission denied` error, and that is what happens locally. But running via this action using [this minimal workflow](https://github.com/matthew-brett/test-actions/blob/main/.github/workflows/test.yml), I get no error - Python can read the unreadable file.

I wonder whether this is because the tox tests are running as some privileged user, for whom setting the user read permission is not effective?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.