Product Documentation

FairCom RTG COBOL User Guide

Previous Topic

Next Topic

<permission>

The <permission> configuration option allows you to set file read/write access, file redefinition, and file delete permissions for the file owner, group members, and all other users.

The <permission> configuration option can have up to 3 possible options:

  • <owner> - set permissions for the file owner
  • <group> - set permissions for the group members of file owner
  • <world> - set permissions for the rest of all users

In turn <owner>, <group>, and <world> can each have up to 4 possible options:

  • <read> - set file access permission
  • <write> - set record write permission
  • <def> - set file redefinition permission
  • <delete> - set file delete permission

If the <permission> keyword is not specified in the configuration file, the default behavior is to allow all permissions to all users. If <permission> is specified in the configuration file, the default behavior is to deny permission unless it is specifically specified with configuration options.

Example 1

The following permission configuration permits file deletion and file redefinition only to the file owner while all users can access the file for reading but only members of the file owner group are allowed to write records:

<file dir="protected">

<permission>

<owner><read>yes</read><write>yes</write><def>yes<def/><delete>yes</delete></owner>

<group><read>yes</read><write>yes</write><def>no<def/><delete>no</delete></group>

<world><read>yes</read><write>no</write><def>no<def/><delete>no</delete></world>

</permission>

</file>

Example 2

The following permission configuration permits file deletion and file redefinition only to the file owner while all users can access the file for reading but only members of the file owner group are allowed to write records:

<file dir="protected">

<permission>

<owner><read/><write/><def/><delete/></owner>

<group><read/><write/></group>

<world><read/></world>

</permission>

</file>

TOCIndex