Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unable to set file as unreadable inside tox container

Open
#30 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, python
Domain
ci-cd, devops

Research direction

Start with the linked tox.ini reproducer and .github/workflows/test.yml, then run the workflow to compare file permissions and the read attempt with local behavior. Done means the final Python read raises Permission denied in the tox container, or the issue clearly documents why that cannot be supported.

Written by the indexing model from the issue text.

Description

bug

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, 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?

Dominant language
Python
Stars
17
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fedora-python/tox-github-action

All issues in fedora-python/tox-github-action

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.