Linux HIMS – Permissions for WordPress Running Scripts

So a key part of HIMS is to send messages to the remote Raspberry Pis. To do this I created some basic python scripts to send messages that the Raspberry Pis are monitoring for.

The biggest issue I had was related to permissions of the files so that I could call them from my PHP code in WordPress.

Ultimately, it appears the security context attributes need to be set correctly along with the permissions. Essentially chcon, and chmod etc need to be set right.
You can see the security context attributes by typing ls -Z
You can see permissions by typing ls -l

In my CENTOS build running SELINUX, they have the httpd_sys_rw_content_t type.

Here’s some info on chcon:


Leave a Reply