After installing Panorama 6 on macOS 10.12.6 (which required manually turning off Gatekeeper), I am now attempting to adjust the Local Network & Internet Zones but each time I attempt to alter the Sharing or Web Publishing attributes to Yes, I get an error 'Failed to install CGI (could not copy file).
That’s been around for a while and is due to the inability of the installer to put Panorama.cgi where it belongs - and which varies epending on the OS. It also depends on if you’re running OS Server or using a standard OS.
Below is a post by Jim Rea from some time back that is still valid. I’ve added additional notes to it. If you’re on OS Sever let me know and I have far more that I can share.
OS X Server and Enterprise
I have confirmed that Apple’s new web server folder arrangement described by Jim Cook only applies to OS X 10.8 SERVER. In regular OS X 10.8, the web server still uses the old folders that were used in 10.7, 10.6 and earlier versions:
/Library/WebServer/Documents
/Library/WebServer/CGI-Executables
ALL versions of OS X and OS X SERVER use the above folders for web publishing EXCEPT OS X 10.8 SERVER, which use the new folder arrangement discovered by Jim Cook:
/Library/Server/Web/Data/Sites/Default
/Library/Server/Web/Data/CGI-Executables
This means that if you want to use Panorama Server Web Publishing or Internet Sharing on OS X 10.8 Server you will have to manually install the Panorama.cgi file. Here are instructions for doing that.
The panorama.cgi file is located here:
/Applications/Panorama/Extensions/Enterprise/cgi-bin/panorama.cgi
Hold down the option key and drag it to /Library/Server/Web/Data/CGI-Executables
To set up the permissions, type this line into Terminal.app
sudo cd /Library/Server/Web/Data/CGI-Executables; chown USERNAME panorama.cgi;chmod 6755 panorama.cgi
Replace USERNAME with your actual unix user name (usually the name of your home folder).
If you need to manually install panorama.cgi on regular 10.8 or any previous version of OS X or OS X Server you can use the same instructions, but substitute /Library/WebServer/CGI-Executables instead of /Library/Server/Web/Data/CGI-Executables
Note: Whatever system you are using, these two folders must have permissions set so that the current user can write files in the folders. On newer systems (10.7 and later) this is NOT the default permissions as shipped by Apple, so you must modify the permissions for these folders, either with the Get Info command or with Terminal.app.
Jim Cook, right back at you in appreciation of your efforts in tracking this down.
Webserver>Documents is not the Apache default on 10.8 and appears to be deprecated.
Instead it uses Library/Server/Web/Data/Sites and Library/Server/Web/Data/CGI-Executables.
Dragging a copy of panorama.cgi to the Library/Server/Web/Data/CGI-Executables folder made the difference. It’s working like a charm now
panorama.cgi is found in Panorama/Extensions/Enterprise.cgi-bin.
Argh. Getting close but not quite there.
Running 10.12.6 (Not Server)
Relevant directory:
/Library/WebServer/CGI-Executables
Copied panorama.cgi there
In Terminal ran:
sudo cd /Library/WebServer/CGI-Executables; chown db_server panorama.cgi;chmod 6755 panorama.cgi
I entered the password, then the response was:
chown: panorama.cgi: No such file or directory
chmod: panorama.cgi: No such file or directory
Interestingly, the panorama.cgi file icon is an unix executable icon until I click on the ‘no’ in the Sharing or Web Publishing column in Panorama Server. The panorama.cgi icon changes to a generic icon, then it asks me for the System Administrator Password. I enter the Admin password for the computer, I get an error message ‘Failed to install CGI (incorrect system administrator password).’ and the icon reverts back to the unix executable icon.
Have you tried connecting from a client? The server almost always throws this message when enabling IP or web sharing, but when I get the message, I just ignore it and the clients can connect even though the error says it didn’t work.
Jef
I’ve never understood the difference, but the Panorama.cgi icon must be a unix icon or it doesn’t work. Sometimes I just have to copy it again from the Panorama folder.
All is good except that I am getting a cgi Out of Memory (I think depending on the number of files that are being loaded and their size.)
It works sometimes and the server does not get recognized as being up at other times.
Thoughts? (I did try upping the memory in Panorama’s Server Preferences/Initialization screen but I think this is something else.
I think Apache is not running the CGI but instead returning the contents of the CGI as the result. So what you are seeing is the machine code, which also includes all of the error messages that can be returned. The Out of Memory error is just one of the errors displayed.
I think the instructions James Cook posted in 2017 are no longer complete. I’m not sure if it had happened by 10.12, but at some point Apple changed the default Apache configuration to disabled CGI plugins. Fixing this requires editing the Apache configuration file (httpd.conf), which is tricky, though BBEdit can do it.
Ok, I did a forum search (for httpd.conf), and it looks like you (Robert) have run into this exact problem before, three years ago. And Apple made the change in 10.10, so that is almost certainly the problem you are encountering today.