I'm trying to set permissions to my fastcgi binary which is started using the lighttpd web-server. When lighttpd starts my binary, the lighttpd access permissions are transferred to my binary. I need my binary to be run with root permissions so it can access certain files. I've read that it is undesirable to run lighttpd as root for security reasons, so I am relucant to do this. If run with the same permissions as lighttpd, my fastcgi binary cannot read/write to files on my arm file system.
Below is some of the configuration in my lighttpd.conf file
server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", "mod_fastcgi", "mod_proxy", "mod_accesslog" )
server.username = "www"
server.groupname = "www"
server.document-root = "/srv/www/htdocs/"
server.errorlog = "/var/log/lighttpd/error.log"
server.upload-dirs = ("/tmp")
server.max-request-size = 40960
server.network-backend = "write"
fastcgi.server = (
".php" =>
("localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"max-procs" => 2,
"bin-path" => "/usr/bin/php-cgi -c /etc"
)
),
".cgi" =>
("localhost" =>
(
"host" => "<hostAddress>",
"port" => 8088,
"min-procs" => 1,
"max-procs" => 1,
"check-local" => "disable",
"bin-path" => "/<pathToMyFastCGI_Binary>/"
) )
)