Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(solved) [Errno 13] Permission denied #29

Open
fartwhif opened this issue Jun 14, 2018 · 0 comments
Open

(solved) [Errno 13] Permission denied #29

fartwhif opened this issue Jun 14, 2018 · 0 comments

Comments

@fartwhif
Copy link

fartwhif commented Jun 14, 2018

CentOS 7
Apache/2.4.6 (CentOS) mod_python/3.5.0-e9fc930 Python/2.7.5

Problem:

 PYNTLM: Error when retrieving Type 2 message from server(192.168.64.1) = [Errno 13] Permission denied
 PYNTLM: Exception: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pyntlm.py", line 233, in connect_to_proxy
    ntlm_challenge = proxy.negotiate(type1)
  File "/usr/lib/python2.7/site-packages/PyAuthenNTLM2/ntlm_proxy.py", line 75, in negotiate
    self._openConnection()
  File "/usr/lib/python2.7/site-packages/PyAuthenNTLM2/ntlm_proxy.py", line 46, in _openConnection
    self.socket.connect((self.ipaddress, self.port))
  File "/usr/lib64/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 13] Permission denied

Solution:

run the following command as root
setsebool httpd_can_network_connect=1
selinux is enabled by default
Please add this to the troubleshooting checklist.

It might be a good idea to include this in various exception handling contexts. I had to do it to obtain the stack trace:
req.log_error('PYNTLM: Exception: %s' % (traceback.format_exc()), apache.APLOG_CRIT)

@fartwhif fartwhif changed the title [solution] [Errno 13] Permission denied (solved) [Errno 13] Permission denied Jun 14, 2018
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

No branches or pull requests

1 participant