Bug #2982


cgi file using shared memory

Added by esx about 3 years ago. Updated about 3 years ago.

Target version:


Hello ,
I use Ubuntu 18.04 and Lighttpd 1.4.45.
I want to make diagnostic data collected by a background process and processed in a shared mem accessible to our service staff via cgi programs written in FPC. The data should be available on different HTML pages via a browser. The Html pages are created by cgi programs and updated by JS. JS calls another CGI-program, which reads and provides the necessary data from the shared mem. The JS calls the cgi-program without problems, but the cgi-program cannot connect to the shared mem. Call the cgi-program from the console and everything will work. The connection to the shared mem is established and the data can be read and written. If the cgi-program is called by the lighty - no reaction.
cgi, fastcgi and fastcgi-php are enabled. The basic configuration looks like this:

server.modules = (

server.document-root = "/var/www/html"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log" = "/var/run/"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80

server.http-parseopts = (
"header-strict" => "enable",# default
"host-strict" => "enable",# default
"host-normalize" => "enable",# default
"url-normalize-unreserved"=> "enable",# recommended highly
"url-normalize-required" => "enable",# recommended
"url-ctrls-reject" => "enable",# recommended
"url-path-2f-decode" => "enable",# recommended highly (unless breaks app)
#"url-path-2f-reject" => "enable",
"url-path-dotseg-remove" => "enable",# recommended highly (unless breaks app)
#"url-path-dotseg-reject" => "enable",
#"url-query-20-plus" => "enable",# consistency in query string

index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )

include_shell "/usr/share/lighttpd/"
include_shell "/usr/share/lighttpd/"

server.modules += (

Does anyone have any idea why I can't read from the shared mem with the cgi program?

Thanks in advance.

Actions #1

Updated by gstrauss about 3 years ago

  • Status changed from New to Invalid

Do not file a bug report to ask a question. You can try the Forum tab above, but this question has very little to do with lighttpd.

Try running the web server as a different user and seeing if the CGI works.
Try running the CGI script as the user under which you run lighttpd.

Your problem likely has to do with permissions on the shared memory segment, or other system configuration (e.g. SELinux), but has nothing to do with the lighttpd web server.


Also available in: Atom