I've setup ikiwiki on a lighty now for some weeks. Blogging and Wiki functionality seems to be up for now. Despite the fact, that I have to make a clear mind to myself, how I want to structure the site, it's fine so far.

Now I want to setup the distributed laptop wiki, as mentioned on the ikiwiki-website. The current problem I'm troubleshooting is, that the cgi itself doesn't seem to work, the way, I want.

The wiki is correctly build on my laptop, but editing via cgi fails. No, it doesn't really fail, but the form for editing doesn't show the current content of the page, but rather is empty.

On the webserver itself everything works fine. As I'm concerned the config is identical, both on Webserver and Laptop.

  • same lighttpd-version
  • same ikiwiki-version
  • identical configfiles for lighttpd
  • identical configfiles for ikiwiki (except for neccesary git-settings)
  • pathnames equal
  • permissions for files and pathnames are more restricive on the webserver than the laptop.

Normally this looks to me like an permission issue. So maybe the cgi-wrapper can't read the wiki-sources. But looking on the last point, I have my concerns....

But: How do you debug this?

  • I would really like to know with what permissions does the CGI attempt to access the files
  • The logs are empty concerning these details
  • I tried 'strace'-ing the lighty with
strace -f -F  lighttpd -f /etc/lighttpd/lighttpd.conf -D 2>&1  
  • I see the childprocess spawn the ikiwiki.cgi (which is correctly chown'ed and chmod'ed to suid


  • How can I verify, permissions are correct?


The problem described is solved now:

The empty editpage was probably caused by an old, outdated cgi-wrapper. Because of a typo in the config, the cgi-wrappers were created in the wrong places, and the one in /var/www was never updated to version 2.6 That is solved now.

But how do I troubleshoot now the Permissions?

I got the hint from Joey Hess:

  • activate the "anonok"-plugin, to have anonymous editing without having to care for cookies
  • run the cgi without the webserver
REQUEST_METHOD=GET QUERY_STRING="do=edit&page=index" strace ./ikiwiki.cgi