FILE Class

Each record in the FILE class defines the access that is allowed to a specific file or directory, or to files that match a file name pattern. You can define a rule even though a file is not yet created.
capamsc141
Each record in the FILE class defines the access that is allowed to a specific file or directory, or to files that match a file name pattern. You can define a rule even though a file is not yet created.
Device files and symbolic links can be protected like any other file. However, by protecting a link, you do not automatically protect the file that the link points to.
On the NTFS file system, a record in the FILE class also defines the access to the file streams.
When you define a script as a file, allow both 
read
 and 
execute
 access to the file. When you define a binary, 
execute
 access is sufficient.
For users outside the 
special_restricted
 group, the 
_default
 record in the FILE class (if _default record does not exist then the record for FILE in the UACC class) 
protects only files that are part of 
Privileged Access Manager
 
such as the seos.ini, seosd.trace, seos.audit, and seos.error files. These files are not explicitly defined to 
Privileged Access Manager
, but are automatically protected by 
Privileged Access Manager
.
Privileged Access Manager
uses the PROGRAM class and not the FILE class to protect
setuid
and
setgid
programs.
The key of the FILE class record is the name of the file or directory protected by the record. The full path must be specified.
The following definitions describe the properties contained in this class record. Most properties are modifiable and can be manipulated using Selang or the administration interfaces. Non-modifiable properties are marked 
informational
.
  • ACL
    Defines a list of accessors (users and groups) permitted to access the resource, and the accessor access types. Each element in the access control list (ACL) contains the following information:
    • Accessor
      Defines an accessor.
    • Access
      Defines the access authority that the accessor has to the resource. Use the Access parameter with the authorize or authorize- command to modify the ACL.
  • CALACL
    Defines a list of the accessors (users and groups) that are permitted to access the resource, and their access types according to the Unicenter NSM calendar status. Each element in the Calendar Access Control List (CALACL) contains the following information:
    • Accessor
      Defines an accessor.
    • Calendar
      Defines a reference to a calendar in Unicenter TNG. Use the Calendar parameter with the authorize command to permit user or group access to the resource according to the access defined in the calendar ACL.
    • Access
      Defines the access authority that the accessor has to the resource. Access is permitted only when the calendar is ON. Access is denied in all other cases.
  • CALENDAR
    Represents a Unicenter TNG calendar object for user, group, and resource restrictions in 
    Privileged Access Manager
    Privileged Access Manager
     fetches Unicenter TNG active calendars at specified time intervals.
  • CATEGORY
    Defines one or more security categories assigned to a user or a resource.
  • COMMENT
    Defines additional information that you want to include in the record. 
    Privileged Access Manager
     does not use this information for authorization.
    Limit:
     255 characters
  • CREATE_TIME
    (Informational) Displays the date and time when the record was created.
  • DAYTIME
    Defines the day and time restrictions that govern when an accessor can access a resource.
    Use the restrictions parameter with the 
    chres
    ch[x]usr
    , or 
    ch[x]grp
     commands to modify this property. The resolution of daytime restrictions is one minute.
  • Groups
    The list of GFILE or CONTAINER records a resource record belongs to.
    DB property:
     GROUPS
    To modify this property in a FILE class record, change the MEMBERS property in the appropriate CONTAINER or GFILE record.
    Use the 
    mem+
     or 
    mem-
     parameter with the 
    chres
    editres
    , or 
    newres
     command to modify this property.
  • NACL
    The 
    NACL
     property of a resource is an access control list. The list defines the accessors that are denied authorization to a resource, along with the type of access that they are denied (for example, write). See also ACL, CALACL, PACL. Each entry in the NACL contains the following information:
    • Accessor
      Defines an accessor.
    • Access
      Defines the type of access that is denied to the accessor. Use the 
      authorize deniedaccess
       command, or the 
      authorize- deniedaccess-
       command, to modify this property.
  • NOTIFY
    Defines the user to be notified when a resource or user generates an audit event. 
    Privileged Access Manager
     can email the audit record to the specified user
    .
    Limit:
     30 characters.
  • OWNER
    Defines the user or group that owns the record.
  • PACL
    Defines a list of accessors that are permitted to access the resource when the access request is made by a specific program (or a program that matches a name-pattern) and their access types. Each element in the program access control list (PACL) contains the following information:
    • Accessor
      Defines an accessor.
    • Program
      Defines a reference to a record in the PROGRAM class, either specifically or by wildcard pattern matching.
    • Access
      Defines the access authority that the accessor has to the resource.
      You can use wildcard characters to specify the resource in a PACL.
    Use the via(
    pgm
    ) parameter with the Selang authorize command to add programs, accessors, and their access types to a PACL. You can use the authorize- command to remove accessors from a PACL.
  • RAUDIT
    Defines the types of access events that 
    Privileged Access Manager
     records in the audit log. RAUDIT derives its name from 
    R
    esource 
    AUDIT
    . Valid values are:
    • all
      All access requests
    • success
      Granted access requests
    • failure
      Denied access requests (default).
    • none
      No access requests
    Privileged Access Manager
     records events on each attempted access to a resource, and does not record whether the access rules were applied directly to the resource, or were applied to a group or class that had the resource as a member. Use the audit parameter of the
     chres
     and
     chfile 
    commands to modify the audit mode.
  • SECLABEL
    Defines the security label of a user or resource.
    The SECLABEL property corresponds to the label[-] parameter of the
    chres
    and
    ch[x]usr
    commands.
  • SECLEVEL
    Defines the security level of an accessor or resource. This property corresponds to the level[-] parameter of the 
    ch[x]usr
     and 
    chres
     commands.
  • UACC
    Defines the default access authority for the resource, which indicates the access that is granted to accessors who are not defined to 
    Privileged Access Manager
     or who do not appear in the ACL of the resource.
    Use the 
    defaccess
     parameter with the 
    chres
    editres
    , or 
    newres 
    command to modify this property.
  • UNTRUST
    Defines whether the resource is untrusted or trusted. If the UNTRUST property is set, accessors cannot use the resource. If the UNTRUST property is not set, the other properties that are listed in the database for the resource are used to determine accessor access authority. If a trusted resource is changed in any way, 
    Privileged Access Manager
     automatically sets the UNTRUST property.
    Use the trust[-] parameter with the 
    chres
    ,
     editres
    , or 
    newres
     command to modify this property.
  • UPDATE_TIME
    (Informational) Displays the date and time when the record was last modified.
  • UPDATE_WHO
    (Informational) Displays the administrator who performed the update.
  • WARNING
    Specifies whether Warning mode is enabled. If you enable the Warning mode on a resource, then all the access request to a resource is granted. If an access request violates an access rule, a record is written to the audit log.
Example: 
This example shows how to restrict user access to a file by using the FILE class in Unix/Linux endpoint. 
Step 1:
Create a file "/home/my_home/hello.c".
PAMSC> nf /home/my_home/hello.c
Step 2:
When a file is created, by default every one has read access. We create a policy that restricts default user access to the file "/home/my_home/hello.c". This policy restricts even the superuser (example, root) from accessing the file.
PAMSC> er FILE("/home/my_home/hello.c") audit(all) owner(nobody) defaccess(none) 
Step 3:
View the file "/home/my_home/hello.c" details.
PAMSC> sr FILE /home/my_home/hello.c
(localhost)
Data for FILE '/home/my_home/hello.c'
-----------------------------------------------------------
Defaccess : None
Audit mode : All
Owner : nobody (USER )
Create time : 13-Feb-2017 14:58
Update time : 13-Feb-2017 15:04
Updated by : root (USER )
Step 4:
A user logs in to the host and tries to access the file "/home/my_home/hello.c". The policy restricts user from accessing the file.
Host_Machine_Name> ls -l /home/my_home/hello.c
/bin/ls: cannot access /home/my_home/hello.c: Permission denied
Step 5
: Create a policy that authorizes superuser (root) to access this file.
PAMSC> AUTHORIZE FILE("/home/my_home/hello.c") uid(root) access(a) 
 
Step 6
: View the file "/home/my_home/hello.c" details.
PAMSC> sr file /home/my_home/hello.c
(localhost)
Data for FILE '/home/my_home/hello.c'
-----------------------------------------------------------
Defaccess : None
ACLs :
Accessor Access
root (USER ) R, W, X, Cre, Del, Chown, Chmod, Utime, Sec, Rename, Chdir
Audit mode : All
Owner : nobody (USER )
Create time : 13-Feb-2017 14:58
Update time : 16-Feb-2017 17:54
Updated by : root (USER )