WARNING: InstallApacheCGI could not delete (panorama.cgi)

Setting up a new Mac mini with macOS Sierra 10.12.6, I am in the Server Activity Monitor and attempting to set the Internet Sharing to ‘yes’ as well as the Web Publishing to ‘yes’ and upon selecting the ‘yes’ from the popdown, I get the above message. That message is then followed by a 2nd message that says 'Failed to install CGI (incorrect system administrator password).

I have trashed the Server app, emptied trash, restarted, reinstalled Pano Server & Pano app. Unlocked the Server app, changed the master password, (which required the new Enterprise password as well as the System password), updated the IP address to the public IP address that the machine is set to. I have set my System Sharing to File Sharing, Remote Management, Remote Apple Events. In the Server Activity Monitor, the Local Network Sharing is set to ‘yes’. These final 2 steps to getting the server online though are not happy when I attempt to set them to ‘yes’.

Ideas?

This was originally posted on the QNA list in March 2015, and I think will be helpful to you.


On March 9, 2015, Apple released Security Update 2015-002 for OS X 10.9 and 10.10. This update has an unfortunate side effect – it breaks Remote Apple events. Many of you are using the Remote Apple events option for communication between Panorama Clients and Panorama Server on your local network. This is the easiest option to set up for local database sharing, and has worked well for the past 8 years. Unfortunately, if you are using the local sharing option, it will immediately stop working if the Security Update 2015-002 is installed on a client computer (we’re not sure at this time if it has any effect if installed on a server computer). The symptom is that your client databases will no longer connect to Panorama Server.

If you are using local database sharing and you have not yet installed Security Update 2015-002, we recommend that you hold off on installing this update for now. We have reported this problem to Apple, so hopefully this problem will be fixed in a future update from them. However, we don’t have any inside information there – it’s possible that Apple may never fix this, or that it may not be fixed for some time. We’re not sure what other software is affected by this, though I do know of at least one other program that is affected by this. If any of you have any connections at Apple, I’d be happy to supply you with the radar reference number for the bug report we have submitted.

If you do install Security Update 2015-002, it’s possible to get Panorama Server working again by switching to TCP/IP instead of Remote Apple events. However, TCP/IP is much more difficult to set up. We’ve had several Panorama Server installations make this switch this week, and it generally takes a day or two to get it working. Below is a guide for getting TCP/IP running.

First of all, I have created a crude wizard that assists with setting up Panorama Server for TCP/IP operation. You can download this wizard here.

http://ipodorganizer.com/Downloads/MacOSX/ApacheFixer.pan.zip

Once downloaded, you can put it anywhere on your (server) system. It’s a Panorama database (with no data), so just open it with the copy of Panorama on your server machine (not with Panorama Server – that might work, but I didn’t test it).

This wizard does two things. Before performing either of these actions, you must enter your computer admin password at the top of the wizard.

  1. Turn on Apache

Starting with OS X 10.8, Apple no longer includes a panel to turn on the Apache Web Server. But Apache is still there. Just press the “Start Apache” button on this wizard to start it up.

Note: There is also a free System Preference panel that you can get to do this:

https://clickontyler.com/web-sharing/

  1. Install the Panorama CGI

Press the “Install Panorama CGI” button to install this on your computer. This also adjusts the permissions on your system to allow this. If you are using OS X Server, check this box before pressing the button.


This wizard addresses the two issues that required using the Terminal. However, it doesn’t automate the entire process.

For reliable operation, you should set up the server computer with a static IP address on your network (if your router routinely gives out the same IP address to the server machine, you may be able to skip this, YMMV). You need to pick an IP address that will never be used. Ideally, you should configure your router to leave a range of IP addresses you can use for static IPs. Each router does this differently. Then, on the server computer you must set up the Advanced network preferences to “using dhcp with manual address”. I found this web page that explains this process.

Please note that the screen shot on this page contains an error – you should NEVER use an IP address ending in 255. In spite of this error, this was the best page I found describing the process. Here is another page.

http://www.tech-otaku.com/networking/assigning-locally-networked-computer-static-ip-address-mac-os-x/

If you are using an Airport Extreme router, this may be helpful.


In the Panorama Server control panel, make sure that Local sharing is turned off, and Internet sharing is turned on. See page 55 of the Panorama Server Handbook.

If you are using OS X Server, you’ll get an error when you turn Internet sharing on, but you can ignore this error.


The two “Test” buttons open a web page in Safari. If everything has worked, these web pages will open without an error. The “Test Apache” normally opens a page that says “It works!” (unless you’ve actually set up web pages). The “Test Panorama CGI” page normally displays a message saying that web publishing is not enabled – unless of course you have enabled it.


One final issue is that for TCP/IP to work, your databases must have the “Internet Database Sharing” option enabled. If only the “Local Database Sharing” option is enabled, the database will not work with TCP/IP connections. So for each database, you need to open the Database Sharing Options wizard, check the “Internet Database Sharing” option, then press Apply Changes. Remember, this must be done separately for each database.


Hopefully this wizard will help ease the transition from Apple Event based connections to TCP/IP. By the way, the code in this wizard isn’t locked down, so you can look at it and/or modify it. If anyone finds any bugs, let me know.

The Wizard was helpful for what it did do I am sure. But…

The ‘Test Apache’ button does display the ‘It Works!’ page. The ‘Test Panorama CGI’ button downloads a copy of ‘Panorama cgi’. No message, the download just happens.

The Server Activity Monitor now shows Local Network as ‘Sharing - no’. The Internet line shows as ‘Sharing? - yes’ and ‘Web Publishing?’ - yes.

But from a client computer running Panorama, if I use the Sharing Wizard to select ‘Available Servers’, and I attempt to add the remote server, I get ‘There is no Panorama Server at http://12.174.x.x’ (The x’s are the correct octet numbers for the remote server.)

If I use Panorama on the server machine, and open the Wizard Sharing:‘Server Administration’, when I use the ‘Choose the server you want to administer:’, I can select the server name from the popdown, but I then get a Dialog 'ERROR: Could not connect with server: (and then binary data is here).
Back in the Server Administration:Panel, the Sever Snapshot displays the correct public IP address.

Moving forward thanks to Jeff Kozuch, but still not there.

In a Finder window, while viewing the contents of my primary hard disk, I did a Command-Shift-. which revealed my hidden files and directories. I then navigated to /etc/apache2/httpd.conf and opened it with BBEdit. I uncommented the following line by removing the # at the beginning of the line…

LoadModule cgi_module libexec/apache2/mod_cgi.so

Further down in the httpd.conf file, I found the section that started with…

<Directory "/Library/WebServer/CGI-Executables">

I changed the contents of that section to…

Allow Override None
Options ExecCGI
AddHandler cgi-script .cgi .pl .tcl .py
Require all granted

I saved the altered .conf file and restarted my server.

Now on the client machine running Panorama, when I used the Available Servers dialog, and entered the remote IP address of the server, up popped the Server name and its IP address. Cool. Onward.

I created a small database and opened Wizards/Sharing/Database Sharing Options. The file name displayed in the ‘Choose your database…’. I selected the remote server from the popdown. I checked the Local Database Sharing option, the Internet Database Sharing Option, & the Web Publishing. (If I unselected the Local Database Sharing checkbox, I then lost the Internet Database Sharing box from being checked.) When I pressed the Apply Changes button, a dialog presented asking that I confirm the settings. I pressed apply options and then I got another dialog:

Database: Transactions
Config updated.
Closed on server
Opened for sharing on server.
Complete.

All seemed good to go. But alas…

I got errors on the server with a dialog stating something to the effect of ‘No window can be found.’ I also had errors when attempting to edit a record on the shared database.

My last paragraph is vague because as I tried to document what I did, by repeating the sequence a few times, omg, the thing started working. I’m not sure what I did but I repeatedly set about sharing the file with the Database Sharing Options:Expert window and somehow it started working. Woo Hoo. Enough for tonight.

Thanks again Jeff to push me in the right direction.

I felt like I was ready for more debugging so I took the opportunity to upgrade the mini server to the next version of macOS High Sierra 10.13 and of course everything broke again. :frowning: But it did give me another opportunity to work through the steps. One typo from the above (which I am unable to Delete or Edit) is this item…

I changed the contents of that section to…

AllowOverride None
Options ExecCGI
AddHandler cgi-script .cgi .pl .tcl .py
Require all granted

At the end of the steps, when the original databases still could not connect with the server the answer was to…

  1. Force to Single User
  2. Only set the Web Publishing option
  3. Then set the Internet Database Sharing option (which automatically checked the Local Database Sharing option)
  4. Then Apply Changes

If I tried to do all 3 checkboxes at one time, it failed. Using the above steps, my databases now connect successfully with the Enterprise Server.