Skip to end of metadata
Go to start of metadata

Developer's forum post: http://community.pbspro.org/t/pp-475-pp-476-pbs-audit-a-tool-to-detect-and-fix-permissions-problems-preventing-pbs-professional-from-functioning-properly-optimally/518


Target Release17.2.1
JIRA

PP-475 - Getting issue details... STATUS

PP-476 - Getting issue details... STATUS

Document statusInitial version
Document owner
Designer
Developers
QA


Forum DiscussionCommunity forum


  • Interface 1: pbs_audit
    Visibility: Public
    Change Control: Stable

·        Details:

         pbs_audit runs in “report” mode and if user is a super user then pbs_audit will run in both "report" and “fix” mode  . In this mode pbs_audit reports on any errors in the PBS infrastructure files that            it detects. pbs_audit will report if any files and directories are missing , any permission/ownership problems and pbs_audit will verify any file checksum differences than original PBS_EXEC files                which was provided by PBS Installer.

         If user is a super user pbs_audit will ask a question if user wants to fix permissions and ownership problems . In fix mode pbs_audit will examine each of the relevant infrastructure files and where          possible fix any permission and ownership problems that it detects and print a message of what got changed. If it is unable to fix a problem, it will simply print a message regarding what was                    detected.

        The problems are categorized and a list of the problem messages are displayed in different categories. Those categories which are empty do not show in the output.

         pbs_audit will read the file paths from value set in Environment for PBS_CONF_FILE else it will use /etc/pbs.conf and will report error message if it is not able find or open the file                     

         Example: <conf_file_path>, Could not open pbs config file

         pbs_audit will report the problems in different categories , Checksum checks are only done for PBS_EXEC 

         Example:  

          === PBS Infrastructure Problems Detected ===

          Missing files or directories:

         <file/dir name>, No such file or directory

          Files or Directories have incorrect Permissions:

          <file/dir name> File/Directory is having incorrect permissions

          Files or Directories with Incorrect Ownership:

          <file/dir name> File/Directory has incorrect ownership

          File checksum problems:

          <file name> File checksum does not match with the original provided by PBS Installer

 

            If user is a super user pbs_audit will ask the question that if user wants to fix permission and ownership issues:

           Example: 

           Do you want to fix permission and ownership problems (y/n) ?

            If user enter y or yes :

            After fixing permissions:

·          <file/dir name> corrected permissions

           If fails :

          <file/dir name> permission correction failed

           After fixing ownership:

          <file/dir name> corrected ownership

          If fails :

          <file/dir name> ownership correction failed

          If user enters n or no :

          pbs_audit will exit


          If no problem is detected pbs_audit will report


          === No PBS Infrastructure Problems Detected ===
           

  • Interface 2: pbs_audit –v / --verbose
    Visibility: Public
    Change Control: Stable
    Details: pbs_audit –v / --verbose runs in “verbose” mode. If the verbose option is turned on, pbs_audit will also output a complete list of the files it checked from the input file with the expectedpermissions in json format.
    Example :
    {
                    "PBS_HOME": {
                                    "server_logs": "S_ISDIR|S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH",
                                    "server_priv": "S_ISDIR|S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IRWXO",
                                    "PBS_HOME/server_priv": {
                                                    "jobs": "S_ISDIR|S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IRWXO",
                                                    "db_user": "S_ISREG|S_IRUSR|S_IWUSR|S_IRWXG|S_IRWXO"
                                    }
                    },
                    "PBS_EXEC": {
                                    "lib": "S_ISDIR|S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH",
                                    "libexec": "S_ISDIR|S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH",
                                    "PBS_EXEC/libexec": {
                                                    "install_db": "S_ISREG|S_IRUSR|S_IWUSR|S_IXUSR|S_IRWXG|S_IRWXO",
                                                    "pbs_habitat": "S_ISREG|S_IRUSR|S_IWUSR|S_IXUSR|S_IRWXG|S_IRWXO"
                                    }
                    }
    }

  • Interface 3: pbs_audit --version
    Visibility: Public
    Change Control: Stable
    Details: pbs_audit --version command returns its PBS version information and exits
    Example:
    pbs_version = <pbs version>
  • No labels