python-eggs异常解决方法
问题:
homer@ubuntu:~$ python
Python 2.7.6 (default, Jan 25 2014, 12:41:48)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ujson
/usr/local/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg/pkg_resources.py:975: UserWarning: /home/homer/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
问题分析:
/home/homer/.python-eggs 目录可以被 group/others 写入,导致不安全和容易受攻击,这是权限设置不当造成的。
解决方法:
修改 group/others 目录的权限
chmod g-wx,o-wx /home/homer/.python-eggs/
修改后的结果:
homer@ubuntu:~$ ll /home/homer/
drwxr--r-- 8 homer homer 4096 4月 23 13:09 .python-eggs/
版权所有: 本文系米扑博客原创、转载、摘录,或修订后发表,最后更新于 2014-06-09 20:50:54
侵权处理: 本个人博客,不盈利,若侵犯了您的作品权,请联系博主删除,莫恶意,索钱财,感谢!
转载注明: python-eggs异常解决方法 (米扑博客)