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

Unable to set file as unreadable inside tox container

未关闭
#30 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
17
派生
3
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。