Here is my current Upstart script I've placed at /etc/init/redis.conf:
description "redis server"
start on runlevel [2345]
stop on shutdown
exec sudo /opt/redis/redis-server /opt/redis/redis.conf
post-start exec sudo chmod 777 /tmp/redis.sock
respawn
What I am trying to do is start the redis server, then once its running immediately change the permissions of the socket file it creates to be more permissive.
Unfortunately there is currently no way to configure redis to set the socket permissions to anything other than 755, which is too restrictive for my use case.
This script does not work. It effectively starts up the redis server but the unix file permissions remain the same.
Any idea how I can go about accomplishing the goal of changing the socket permissions right after redis starts while retaining the ability to manage redis through upstart?

sudoin your exec parts, the script will be run as root. – Hamish Downer Oct 18 '11 at 22:41