+

Search Tips | Advanced Search

crtmqdir (create IBM MQ directories)

Create, check, and correct IBM MQ directories and files.


Purpose

Use the crtmqdir command to check that the necessary directories and files used by IBM MQ exist and have the appropriate ownership and permissions. The command can optionally create any missing directories or files, and correct any inconsistent ownership or permissions.

The system-wide directories and files are created as part of the IBM MQ installation procedure. The tool can subsequently be run to check or ensure that the necessary IBM MQ directories and files continue to have appropriate ownership and permissions.

Important:
  1. We must have sufficient permission to determine whether the configuration is correct and, optionally, correct that configuration.
  2. When we use the -a parameter, no queue managers can be running.
  3. When we use the -m parameter, the queue manager you specified must be stopped.
  4. We must not create, delete, or start any queue managers while crtmqdir is running.

On Windows, this typically means that we are a member of the IBM MQ administration group. This is necessary when using the -a or -m parameters.

On IBM i, we must run the command as a member of the IBM MQ administrative group. This is necessary when using the -a or -m parameters, together with the -f parameter.

On UNIX, this typically means that we are the mqm user. This is necessary when using the -a or -m parameters, together with the -f parameter.

Depending on the configuration, the crtmqdir command might require you to be an operating system administrator, or superuser.

Note: The security of data path/log/qm, on UNIX, is set to 2770.


Syntax

crtmqdir -a-mQMgrName-s-f-xstandardhigh


Required parameters

    Specify one of the following parameters only:

      -a
      Check all directories; that is, system-wide directories and all the queue managers.Attention: The queue manager must be associated with the current installation.

      -m
      Check directories for the specified queue manager name.Attention: The queue manager must be associated with the current installation.

      -s
      Check the system-wide directories; that is, directories that are not queue manager specific.


Optional parameters

    -f
    This option causes directories or files to be created if they are missing, and on UNIX only, ownership or permissions to be corrected if they are inappropriately set.

    If -a or -m is specified on UNIX, as a minimum, the program attempts to correct ownership or permissions on files that were created at the time of queue manager creation.

    -x level of permissions
    Specify one of the following values only:

      standard
      By default, directories and files get a standard set of permissions, but a high level of permissions can be requested.

      high
      This option applies to the following platforms:

      • AIX
      • Linux

      It ensures that files in the following directories can be deleted only by the owner:

      • errors
      • trace
      • webui


Return codes

Return code Description
0 Successful completion
10 A warning occurred
20 An error occurred


Examples

  • The following command checks and fixes the system-wide directories:
    crtmqdir -s -f
  • The following command checks (but does not fix) queue manager QM1:
    crtmqdir -m Qm1

Last updated: 2020-10-04