Skip to content

Conversation

alexander-smolyakov
Copy link
Contributor

Devcontainer name:

  • anaconda

Description:

This PR addresses the [Errno 13] Permission denied error that recently appeared during anaconda devcontainer smoke testing. The error relates to the fact that when PIP installs updates for Python packages, it's not preserving group permissions which results in flipping the group write permission bite:

Without running pip install:

vscode ➜ ~ $ tree -ugp -L 1 /opt/conda/lib/python3.10/site-packages/
/opt/conda/lib/python3.10/site-packages/
...
├── [drwxrwsr-x root     conda   ]  cookiecutter
├── [drwxrwsr-x root     conda   ]  cookiecutter-1.7.3.dist-info
├── [drwxrwsr-x root     conda   ]  cryptography
├── [drwxrwsr-x root     conda   ]  cryptography-39.0.1.dist-info

With running pip install:

vscode ➜ ~ $ tree -ugp -L 1 /opt/conda/lib/python3.10/site-packages/
/opt/conda/lib/python3.10/site-packages/
...
├── [drwxr-sr-x root     conda   ]  cookiecutter
├── [drwxr-sr-x root     conda   ]  cookiecutter-2.1.1.dist-info
├── [drwxr-sr-x root     conda   ]  cryptography
├── [drwxr-sr-x root     conda   ]  cryptography-40.0.2.dist-info

Fix:

We need to reorg several instructions in Dockerfile to ensure the site-packages directory has the correct permissions for all packages.

Changelog:

  • Updated Dockerfile instructions and they order to address issues with PIP and group permission;
  • Removed temp security patches that are no longer actual;
  • Added missing tests for Python packages version check;

- Reorg instructions to resolve issues with PIP and group permission;
- Remove temp patches that are no longer actual;
- Add missing test;
@alexander-smolyakov alexander-smolyakov requested a review from a team as a code owner May 18, 2023 15:14
Copy link
Member

@samruddhikhandale samruddhikhandale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@alexander-smolyakov alexander-smolyakov changed the title WIP: [anaconda] Reorg Dockerfile instructions to resolve issue with group permissions and PIP [anaconda] Reorg Dockerfile instructions to resolve issue with group permissions and PIP May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants