fix_prot

Fix protections on VOB or view storage directories.

fix_prot [–f/orce] { –root [–r/ecurse] [–recover {–chown user | –chgrp group } | –replace/_server_process_group| [–r/ecurse] [–type { d | f }] [–chown user] [–chgrp group] [–chmod permissions] } pname

Description

The fix_prot command repairs protections on view and VOB storage directories. You must run this command on the host where the storage directories reside. Before running this command, shut down VersionVault services to ensure that no files are held open by VersionVault processes (otherwise, fix_prot could ignore open files).

Options

–f/orce Do not prompt for confirmation.

–r/ecurse Recursively fix protections.

–root Specifies that pname is a storage directory root.

–type Specifies the type of file system objects to fix. Use d for directories and f for files. If –type is not specified, fix_prot operates on both directories and files.

–chown Specifies the new owner. Mandatory with –root.

–chgrp Specifies the new primary group. Mandatory with –root.

–chmod Specifies the new access rights: owner, group, other (world). Both symbolic and numeric codes are valid, such as go-x (symbolic) or 0644 (absolute).

–recover (Windows® only) Restores correct file system ACLs in a VOB or view storage directory based on the information in the files identity.sd and groups.sd . Not applicable to VOBs at schema versions 54, 55, 80, or 81, for which vob_sidwalk –recover_filesystem performs this function.

–replace[_server_process_group] (Windows® only) Replaces ACL entries for the HCL VersionVault administrators group. Use this option if you have changed the HCL VersionVault administrators group name or have moved a view to a new domain that has a different SID for this group.

Examples

  • To create a .identity directory after moving a VOB from Windows® to a host running Linux® or the UNIX system. The VOB has been moved to the storage directory /vobstg/winvob.vbs. The new owner is vobadm and the new group is ccusers. You must run this command as root.

    versionvault-home-dir/etc/utils/fix_prot –root –recurse –chown vobadm –chgrp ccusers  /vobstg/winvob.vbs

  • To repair ACLs damaged when a view storage directory was copied to NTFS directory C:\VersionVaultStorage\int.vws using a copy utility that did not preserve ACLs:

    versionvault-home-dir\etc\utils\fix_prot –root –recover C:\VersionVaultStorage\int.vws

  • To display the protection modes associated with the directory E:\vobstg\sources.vbs:

    versionvault-home-dir\etc\utils\fix_prot E:\vobstg\sources.vbsdrwxr-xr-x MYDOMAIN\me MYDOMAIN\mygroup E:\vobstg\sources.vbs

Note: fix_prot may return an error message that begins with the following text:

fix_prot: Error: unknown style protections on directory: The data is invalid.

If it does, you must run fix_prot again and specify all the –chown, –chgrp, and –chmod options and also supply an absolute permissions value, either in numeric or ID=rights (o=rwx) form to –chmod. For example:

versionvault-home-dir\etc\utils\fix_prot –chown owner –chgrp group –chmod 0666 pname