I have a node.js script which need to start at boot and run under the www-data user. During development I always started the script with:
su www-dat
I had the same problem (on CentOS 7) and I fixed it by giving execute permissions to /etc/local:
chmod +x /etc/rc.local