Incorrect permissions on *.egg-info directory
See original GitHub issueIt seems that the setup.py install
command doesn’t set the permissions of the <package>.egg-info/*
files when they already exist, relying on what is already set. As noted in https://github.com/sshuttle/sshuttle/issues/217#issuecomment-381378684, it seems many other projects suffered from the same “bug” in the last years, relying on the packager to set the permissions manually to 644 before uploading to PyPI.
Relying on the umask of the user during the package tarball creation is too error-prone, so maybe permissions should always be set automatically by setuptools.
Maybe this issue is a duplicate of https://github.com/pypa/setuptools/issues/1283, I’m not sure.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
setup.py install running egg_info error: [Errno 13] Permission ...
Afterwards, I run as a regular user and got permission issues. The fix is ownership change. After the above action, the problem was...
Read more >Creating egg-info failing in Docker Container - Packaging
If I use that Dockerfile to build an image for one of my own Python projects, everything works out fine, even if I...
Read more >[US3327]Meet error "could not create 'YourAppName.egg-info'
This bug has been verified and fixed on devenv_2772, the permission denied error is not shown as below: Running greenlet-0.4.0/setup.py -q ...
Read more >problem with multiple egg.info directories - Google Groups
Nose has some test data with an 'egg.info' directory. This causes the editable install to fail. Can line 1458 of pip be changed...
Read more >The Internal Structure of Python Eggs - Setuptools
.egg format: a directory or zipfile containing the project's code and resources, along with an EGG-INFO subdirectory that contains the project's metadata.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, using
pip install .
still gives me the wrong permissions for the<package>.egg-info/*
files.ls -lh /usr/lib/python3.6/site-packages/sshuttle-0.78.4-py3.6.egg-info/
:Telethon had similar issues too. It made many (if not all) Python programs fail due to unreadable files when installed by root (e.g. system package managers). It also has several generated world-writable files.
What’s more, when one extracts the sdist tarball as root, the files are owned by whatever uid and gid the tarball has recorded.
Is it possible to give all files in the created tarballs 755 / 644 permissions and owned by root:root?