Monthly Archives: January 2017

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:

http://www.linux-commands-examples.com/chcon

 

Zyxcel C1000Z Modem and Router – Plex Remote Access Issues

I was having some trouble getting the remote access working for my plex server and realized I had setup the port forwarding incorrectly within my ZyXEL C1000Z modem. I was entering the manual static IP of the server, the starting and ending port of 32,400, the protocol TCP/UDP.

I then left the Remote Port and IP to All Ip Addresses. I applied thinking I was set. Unfortunately, this did not seem to work.

I then enabled the DMZ for my server and tried again and it was fine. I had another router so I set it to bridge mode, disabled the DMZ, reset the manual port forwarding and it still didn’t work.

The fix was making sure to choose Define IP Addresses within step 4. of the Port forwarding page. From there I left the remote Ip address to blank and set the remote port range to be the same as the LAN port range info. That fixed it.