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

Unable to set file as unreadable inside tox container

Aberta
#30 3 comentários 0 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
Python
Estrelas
17
Forks
3
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Comece com o reproducer vinculado de tox.ini e .github/workflows/test.yml e, em seguida, execute o workflow para comparar as permissões dos arquivos e a tentativa de leitura com o comportamento local. Considera-se concluído quando a leitura final em Python gerar Permission denied no contêiner tox ou quando a issue documentar claramente por que isso não pode ser suportado.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
github-actions, python
Domínio
ci-cd, devops
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.