Definition Type: Element
Name: file_state
Namespace: http://oval.mitre.org/XMLSchema/oval-definitions-5#unix
Type: oval-def:StateType
Containing Schema: unix-definitions-schema.xsd
Abstract
Documentation:
The file_state element defines the different metadata associate with a UNIX file. This includes the path, filename, type, group id, user id, size, etc. In addition, the permission associated with the file are also included. Please refer to the individual elements in the schema for more details about what each represents.
Collapse XSD Schema Diagram:
Drilldown into oexec in schema unix-definitions-schema_xsd Drilldown into owrite in schema unix-definitions-schema_xsd Drilldown into oread in schema unix-definitions-schema_xsd Drilldown into gexec in schema unix-definitions-schema_xsd Drilldown into gwrite in schema unix-definitions-schema_xsd Drilldown into gread in schema unix-definitions-schema_xsd Drilldown into uexec in schema unix-definitions-schema_xsd Drilldown into uwrite in schema unix-definitions-schema_xsd Drilldown into uread in schema unix-definitions-schema_xsd Drilldown into sticky in schema unix-definitions-schema_xsd Drilldown into sgid in schema unix-definitions-schema_xsd Drilldown into suid in schema unix-definitions-schema_xsd Drilldown into size in schema unix-definitions-schema_xsd Drilldown into m_time in schema unix-definitions-schema_xsd Drilldown into c_time in schema unix-definitions-schema_xsd Drilldown into a_time in schema unix-definitions-schema_xsd Drilldown into user_id in schema unix-definitions-schema_xsd Drilldown into group_id in schema unix-definitions-schema_xsd Drilldown into type in schema unix-definitions-schema_xsd Drilldown into filename in schema unix-definitions-schema_xsd Drilldown into path in schema unix-definitions-schema_xsd Drilldown into notes in schema oval-definitions-schema_xsd Drilldown into Signature in schema xmldsig-core-schema_xsd Drilldown into deprecated in schema oval-definitions-schema_xsd Drilldown into comment in schema oval-definitions-schema_xsd Drilldown into operator in schema oval-definitions-schema_xsd Drilldown into version in schema oval-definitions-schema_xsd Drilldown into id in schema oval-definitions-schema_xsd Drilldown into StateType in schema oval-definitions-schema_xsdXSD Diagram of file_state in schema unix-definitions-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="file_state" substitutionGroup="oval-def:state">
    <xsd:annotation>
        <xsd:documentation>The file_state element defines the different metadata associate with a UNIX file. This includes the path, filename, type, group id, user id, size, etc. In addition, the permission associated with the file are also included. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="oval-def:StateType">
                <xsd:sequence>
                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestepath" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:path">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the path entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>The name of the file.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestefilename" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:filename">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the filename entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="type" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>This is the file's type: regular file (regular), directory, named pipe (fifo), symbolic link, socket or block special.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestetype" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:type">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the type entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="group_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>The group_id entity represents the group owner of a file, by group number. To test for a file with no group assigned to it, this entity would be used with an empty value.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestegroup_id" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:group_id">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the group_id entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="user_id" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in /etc/passwd. This element represents the owner of the file. To test for a file with no user assigned to it, this entity would be used with an empty value.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilesteuser_id" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:user_id">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the user_id entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="a_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>This is the time of the last access, in seconds since the last epoch.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestea_time" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:a_time">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the a_time entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="c_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>This is the time of the last change to the file's inode, which stores all.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestec_time" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:c_time">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the c_time entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="m_time" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>This is the time of the last change to the file's contents.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestem_time" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:m_time">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the m_time entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="size" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>This is the size of the file in bytes.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestesize" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:size">
                                        <sch:assert test="not(@datatype) or @datatype='int'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the size entity of a file_state should be 'int'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="suid" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Does the program run with the uid (thus privileges) of the file's owner, rather than the calling user?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestesuid" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:suid">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the suid entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="sgid" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Does the program run with the gid (thus privileges) of the file's group owner, rather than the calling user's group?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestesgid" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:sgid">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the sgid entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="sticky" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can users delete each other's files in this directory, when said directory is writable by those users?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestesticky" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:sticky">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the sticky entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="uread" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the owner (user owner) of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilesteuread" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:uread">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the uread entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="uwrite" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the owner (user owner) of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilesteuwrite" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:uwrite">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the uwrite entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="uexec" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the owner (user owner) of the file execute it or, if a directory, change into the directory?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilesteuexec" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:uexec">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the uexec entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="gread" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the group owner of the file read this file or, if a directory, read the directory contents?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestegread" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:gread">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the gread entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="gwrite" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the group owner of the file write to this file or directory?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestegwrite" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:gwrite">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the gwrite entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="gexec" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the group owner of the file execute it or, if a directory, change into the directory?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilestegexec" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:gexec">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the gexec entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="oread" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can all other users read this file or, if a directory, read the directory contents?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilesteoread" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:oread">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the oread entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="owrite" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the other users write to this file or directory?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilesteowrite" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:owrite">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the owrite entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="oexec" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Can the other users execute this file or, if a directory, change into the directory?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="unixfilesteoexec" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="unix-def:file_state/unix-def:oexec">
                                        <sch:assert test="@datatype='boolean'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the oexec entity of a file_state should be 'boolean'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
Signature ds:Signature 0 1
notes oval-def:notes 0 1
path unix-def:path 0 1
filename unix-def:filename 0 1
type unix-def:type 0 1
group_id unix-def:group_id 0 1
user_id unix-def:user_id 0 1
a_time unix-def:a_time 0 1
c_time unix-def:c_time 0 1
m_time unix-def:m_time 0 1
size unix-def:size 0 1
suid unix-def:suid 0 1
sgid unix-def:sgid 0 1
sticky unix-def:sticky 0 1
uread unix-def:uread 0 1
uwrite unix-def:uwrite 0 1
uexec unix-def:uexec 0 1
gread unix-def:gread 0 1
gwrite unix-def:gwrite 0 1
gexec unix-def:gexec 0 1
oread unix-def:oread 0 1
owrite unix-def:owrite 0 1
oexec unix-def:oexec 0 1
Collapse Child Attributes:
Name Type Default Value Use
id oval-def:id Required
version oval-def:version Required
operator oval-def:operator AND Optional
comment oval-def:comment Optional
deprecated oval-def:deprecated false Optional
Collapse Derivation Tree:
Collapse References:
oval-def:state