pycparser icon indicating copy to clipboard operation
pycparser copied to clipboard

Wrong file permissions?

Open jnbr opened this issue 10 years ago • 17 comments

Is it intentional, that files in the 2.16 release are not world readable?

jnbr avatar Oct 23 '16 19:10 jnbr

Can you clarify which files this is about?

eliben avatar Oct 24 '16 12:10 eliben

This is about all files in the tarball and also affects the installed files in /usr/lib/python2.7/site-packages/pycparser-2.16-py2.7.egg-info

I detected it because of this exception, when trying to run ansible-playbook: ERROR! Unexpected Exception: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/pycparser-2.16-py2.7.egg-info/PKG-INFO'

jnbr avatar Oct 24 '16 14:10 jnbr

I have no idea why this happened, to be honest.

eliben avatar Oct 25 '16 03:10 eliben

@eliben Could it be the same issue as this? Maybe you ran setup.py dist as sudo or something...

refi64 avatar Oct 25 '16 14:10 refi64

sigh Python packaging

eliben avatar Oct 25 '16 16:10 eliben

I am running into this same issue. Any chance of a fix?

xdesai avatar Oct 26 '16 19:10 xdesai

@xdesai can you give more details on how the issue is affecting you?

eliben avatar Oct 26 '16 22:10 eliben

Somewhere between 2.15 and 2.16 the file permissions for the files described by @jnbr got changed. So when I install pycparser and then try to run code using it as a non-root user I get permission errors. Downgrading to 2.15 fixed the issue for me cuz the file permissions are universally readable. This is the source tarball from pypi btw.

xdesai avatar Oct 27 '16 13:10 xdesai

I swear, this 2.1x line is cursed or something. :)

refi64 avatar Oct 27 '16 13:10 refi64

I created a new tarball for 2.17 where the permissions should be ok -- pycparser-2.17.tar.gz

Please help me verify this tarball is OK -- that you can pip install pycparser from it and everything works as you expect. Once that's done I can push it to PyPI.

eliben avatar Oct 28 '16 03:10 eliben

I haven't checked with pip but running setup.py install works for me

jnbr avatar Oct 28 '16 10:10 jnbr

@jnbr trying with pip would be greatly appreciated :) It's really exercising more of the "real" system, and is even easier than running setup.py in a virtualenv (no need to untar the tarball)

eliben avatar Oct 28 '16 12:10 eliben

I don't think pip was ever an issue actually. Pip will reset the file permissions and setup.py will not. This is why I had issues in the first place. I just verified the permissions are now what I expect. Thanks for making this fix!

xdesai avatar Oct 28 '16 13:10 xdesai

@xdesai thanks for checking. I didn't know the problem was only with setup.py in this case; it makes sense since the number of reports is so small :) [all the heavy users of pycparser use pip]

eliben avatar Oct 28 '16 13:10 eliben

Just to make sure, I checked pip too now. No issues there.

Yes, most people probably use pip but there are some package managers which use the plain setup.py to handle python packages.

jnbr avatar Oct 28 '16 19:10 jnbr

Thanks for the testing. I pushed release 2.17 to PyPI

eliben avatar Oct 29 '16 02:10 eliben

Since the issue is solved with release 2.17, I will close this issue.

jnbr avatar Nov 02 '16 19:11 jnbr