Script to check permission and ownerships of Informix product.

Technote (troubleshooting)


Problem(Abstract)

This script compares the permission and ownerships of files in a file distribution list with the binaries in the installed Informix product. It generates a list of problems and also a script to correct the permissions and ownership.

Cause

Incorrect permissions or ownership of IBM Informix files might result in product malfunction.


Resolving the problem

This Korn-Shell script will check the permission and ownership of the files that came with your Informix product. It will check the Informix file distribution list against files on the disk to verify that all have the correct ownerships and permissions.

The script will create two output files in the current directory.

    • The file_check.sh.out is a listing of all files that have the wrong permission, are not owned by the correct owner or group, or are missing.
    • The file file_check.sh.update is a script file with UNIX commands to fix any permission or owner problems listed in file_check.sh. You can run this script as user informix or root to correct the problems.

To use the script take these steps:
    1. Copy the file file_check.sh.txt to a work directory. Change the name to file_check.sh.

    file_check.sh.txt

    2. Run the script using this syntax:
      file_check.sh -f filename  [-d directory ]
        filename
          The file distribution list (required)
        directory
          The path to the directory in which your Informix products are installed. If this is not given then the value of $INFORMIXDIR will be used.
    The name of the file distribution list will vary depending on the product. It will always be located in the $INFORMIXDIR/etc directory and will always end with the word files.

      Examples:
        The file distribution list
        for this product...
        ...has this name
        IBM Informix Online Dynamic Server (OnLine)
        $INFORMIXDIR/etc/onlinefiles
        IBM Informix Extended Parallel Server (XPS)
        $INFORMIXDIR/etc/onlinefiles
        IBM Informix Dynamic Server (IDS) version 7
        $INFORMIXDIR/etc/IDSfiles
        IBM Informix Dynamic Server (IDS) version 9, 10 & 11
        $INFORMIXDIR/etc/IIFfiles
        IBM Informix Client SDK
        (CSDK)
        $INFORMIXDIR/etc/clientsdkfiles

About missing files

When file_check.sh reports a missing file it means that the file is listed in the file distribution list but does not exist. This is not always a problem.

Sometimes a file will be removed from a release and due to an oversight the file name will not be removed from the file distribution list. When this occurs it will not cause problems.

Consider the notice of a missing file to be a notification of a potential problem.


Sample Output

These are the output files from a sample run of file_check.sh. This run found 4 "missing" files and one file with the wrong group and permissions.
    Contents of file_check.sh.out
      Missing File(s)
      /usr/informix/msg/en_us/0333/nforms.iem
      /usr/informix/msg/en_us/0333/nformbld.iem
      /usr/informix/etc/sqlhosts.demo
      /usr/informix/etc/Termcap

      Wrong Group (Run ./file_check.sh.update for fix)
      /usr/informix/bin/onstat

      Wrong Owner (Run ./file_check.sh.update for fix)
      No File Found

      Wrong Permission (Run ./file_check.sh.update for fix)
      /usr/informix/bin/onstat

    Contents of file_check.sh.update
      chgrp informix /usr/informix/bin/onstat
      chmod 2755 /usr/informix/bin/onstat

Cross Reference information
Segment Product Component Platform Version Edition
Information Management Informix Extended Parallel Server (XPS) UNIX All Versions All Editions
Information Management Informix OnLine Not Applicable UNIX All Versions
Information Management Informix SE Not Applicable UNIX Version Independent
Information Management Informix Tools Not Applicable UNIX All Versions
Information Management Informix C-ISAM Not Applicable UNIX Version Independent

Rate this page:

(0 users)Average rating

Document information


More support for:

Informix Servers

Software version:

7.2, 7.3, 9.2, 9.3, 9.4, 10.0, 11.1, 11.5

Operating system(s):

AIX, DYNIX/ptx, Digital Unix (OSF1)(tru64), HP-UX, IRIX, Linux, Reliant UNIX, SINIX, Solaris

Reference #:

1113385

Modified date:

2011-10-13

Translate my page

Machine Translation

Content navigation