Skip to content
Advertisement

Why does python xmlrpc call get PermissionError when run through apache?

Here’s /home/blakeh/test.py, which doesn’t really do anything but illustrate the problem with minimal code:

JavaScript

If I run this directly as the apache user, there’s no permission problem with making the RPC “foo” call. It only occurs if I run it through apache. I’m using python 3.5.2.

In an apache .conf file I have this:

JavaScript

If I run this curl command:

JavaScript

… I get an internal server error, with this appended to /var/log/httpd/error_log:

JavaScript

What could explain the difference in behavior? Thanks!

Advertisement

Answer

Velkan’s suggestion to check selinux worked. I could get this working by putting it in permissive mode with “setenforce 0”. Adding this as an “answer” so I can mark it as solved.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement