Forum

cgi-wrapper has stopped working on Linux Mint

Steven
5 April 2018, 22:54
I've just switched distros from MX linux to Linux mint but have kept the same home partition and uid/gid setup only now when I attempt to access my web site I get the following message in my error log

127.0.0.1|Fri 06 Apr 2018 04:37:56 +0800|/home/steven/projects/aureus.tech/index.stml|CGI-wrapper: setuid(0) error

The relevant lines from cgi -wrapper.conf are
CGIhandler = /home/steven/projects/aureus.tech/stml.cgi
Wrap = steven ; /home/steven/projects/aureus.tech ; steven

and in hiawatha.conf
CGIhandler = /home/steven/projects/aureus.tech/stml.cgi:stml
VirtualHost {
Hostname = aureus.tech, *.aureus.tech
WebsiteRoot = /home/steven/projects/aureus.tech
StartFile = index.stml
ExecuteCGI = yes
WrapCGI = steven
}

So does anyone know whats up? There is a user steven with uid 1000 on my system and, as said, the exact same setup works fine on the other distro, I've even tried disabling apparmor on mint thinking it was the kernel interfering but same result.
Steven from THE FUTURE
10 April 2018, 02:12
Have you checked the suid bit on your cgi-wrapper executable? I had the same problem on Ubuntu.
# ls -l /usr/sbin/cgi-wrapper
-rwsr-xr-x 1 root root 31352 Jun 11 2017 /usr/sbin/cgi-wrapper

If you don't see -rws in the first 4 characters then
# chmod 4755 /usr/sbin/cgi-wrapper

Regards,
Steven
IT Consultant for FastTech Support [www.fasttech.support]
Steven
10 April 2018, 02:22
Ah that was it.
Wish I'd could've met someone like you 5 days ago buddy, somehow I just assumed a package manager would take care of file permissions when it was, you know, installing said files.
This topic has been closed.