Technical article 127624

How can I view sysinfo reports in my browser?

OpenServer 6.0.0OpenServer 5.0.7UnixWare 7.1.4

Written · Last revised

Problem

Previously sysinfo reports were viewable through my web browser, but now the URL (http://localhost/sysinfo.html) results in a "403 Forbidden" page, stating that I don't have permission to access /sysinfo.html on this server.

Cause

Starting in June 2011, with sysinfo version 11060301, the default permissions for reports created by sysinfo were changed to only allow viewing by the creator of the report to avoid possibly leaking sensitive information.

Solution

The sysinfo command generates a report which contains information useful for solving support issues, but some of this information could be considered sensitive, including:

account names
open ports
active processes
missing patches

While this information could be considered sensitive it is helpful in solving support issues.

The sysinfo utility has options for controlling how and where it builds reports as well as the information included in these reports.

Some of these options are: 1) modifying the file creation umask 2) changing the location where reports are written. 3) modifying the report content

Option 1 - Modifying the file creating umask

To revert back to the previous file creation umask, create or edit a site specific configuration file for sysinfo as,

/usr/lib/sysinfo.d/`uname -n`.sysinfo.conf
-or-
/usr/lib/sysinfo.d/myhost.sysinfo.conf

Add or update the umask setting with:

UMASK=022

A umask of 022 will allow the sysinfo reports to be viewable by everyone, including the anonymous http browser user.

Option 2 - Changing the location where reports are written.

Another alternative is to change the default location
where the sysinfo HTML reports are stored.  This is also
controlled in the sysinfo configuration file as the
variable 'DocDir='.

By default this is now set to /var/adm. To revert to the previous behavior set DocDir="" and sysinfo will try to detect your webserver's document directory and use that to store reports. You can override this by setting 'DocDir=' to a different path:

DocDir=/home/admin/reports

For text report there is a similar 'TextDir=' variable.

You can also use the -f option to specify the path where sysinfo will write the report.

/etc/sysinfo -f /home/admin/reports/sysinfo.html

Option 3 - Changing the content of sysinfo reports

If you are concerned with exposing certain information in the sysinfo report but still want to have the reports viewable through a browser, there is an option to change the content which will be in each report, by using:

# /etc/sysinfo template

This will create a template file /usr/lib/sysinfo.d/template which can be edited to remove information which is displayed in the report.

Note: Use `/etc/sysinfo configure` for a menu to assist in
generating a  template.
Once a template file exists, it is used to generate
reports.  If system specific information like hostname or
IP address changes then a new template file might be
needed.

If you also want these reports to be viewable through your browser then you'll also want to change the umask as noted above.

NOTES:    To preserve configuration changes across sysinfo updates,
          it is suggested that adjustments to variables in the
          sysinfo.conf file be saved in a site specific
          configuration file, based on the system node name `uname -n`:
/usr/lib/sysinfo.d/`uname -n`.sysinfo.conf
-or-
/usr/lib/sysinfo.d/myhost.sysinfo.conf

To revert to the behavior prior to June 2011, update this file with: UMASK=022 DocDir=""

If these changes are made in /usr/lib/sysinfo.d/sysinfo.conf, instead of a host specific configuration file, they may be lost if the sysinfo package is updated.

See also

/etc/sysinfo -help
/usr/lib/sysinfo.d/sysinfo.conf
http://www.sco.com/support/sysinfo.html
TA126481 - "What is the `sysinfo` support tool and where can I
            download it?"

From the Xinuos technical article database, record 127624. Reproduced with permission. The original is at www.sco.com/ta/127624, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.