<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:UnixFileObj="http://cybox.mitre.org/objects#UnixFileObject-2" xmlns:cyboxCommon="http://cybox.mitre.org/common-2" xmlns:FileObj="http://cybox.mitre.org/objects#FileObject-2" targetNamespace="http://cybox.mitre.org/objects#UnixFileObject-2" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.1">
	<xs:annotation>
		<xs:documentation>This schema was originally developed by The MITRE Corporation. The CybOX XML Schema implementation is maintained by The MITRE Corporation and developed by the open CybOX Community. For more information, including how to get involved in the effort and how to submit change requests, please visit the CybOX website at http://cybox.mitre.org.</xs:documentation>
		<xs:appinfo>
			<schema>Unix_File_Object</schema>
			<version>2.1</version>
			<date>01/22/2014</date>			
			<short_description>The following specifies the fields and types that compose this defined CybOX Object type. Each defined object is an extension of the abstract ObjectPropertiesType, defined in CybOX Common. For more information on this extension mechanism, please see the CybOX Specification. This document is intended for developers and assumes some familiarity with XML. </short_description>
			<terms_of_use>Copyright (c) 2012-2014, The MITRE Corporation. All rights reserved. The contents of this file are subject to the terms of the CybOX License located at http://cybox.mitre.org/about/termsofuse.html. See the CybOX License for the specific language governing permissions and limitations for use of this schema. When distributing copies of the CybOX Schema, this license header must be included.</terms_of_use>
		</xs:appinfo>
	</xs:annotation>
	<xs:import namespace="http://cybox.mitre.org/common-2" schemaLocation="http://cybox.mitre.org/XMLSchema/common/2.1/cybox_common.xsd"/>
	<xs:import namespace="http://cybox.mitre.org/objects#FileObject-2" schemaLocation="http://cybox.mitre.org/XMLSchema/objects/File/2.1/File_Object.xsd"/>
	<xs:element name="Unix_File" type="UnixFileObj:UnixFileObjectType">
		<xs:annotation>
			<xs:documentation>The Unix_File object is intended to characterize Unix files.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="UnixFileObjectType" mixed="false">
		<xs:annotation>
			<xs:documentation>The UnixFileObjectType type is intended to characterize Unix files.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="FileObj:FileObjectType">
				<xs:sequence minOccurs="1">
					<xs:element name="Group_Owner" type="cyboxCommon:StringObjectPropertyType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The Group_Owner field specifies the name of the group which owns the file.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="INode" type="cyboxCommon:UnsignedLongObjectPropertyType" minOccurs="0" maxOccurs="1">
						<xs:annotation>
							<xs:documentation>The INode field specifies the inode, or index node, value of the file.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="Type" type="UnixFileObj:UnixFileType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Specifies file type using the UnixFileTypeEnum enumeration.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="UnixFilePermissionsType">
		<xs:annotation>
			<xs:documentation>The UnixFilePermissionsType type specifies the specific permissions used by the Unix family of operating systems.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="FileObj:FilePermissionsType">
				<xs:attribute name="suid" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The suid field specifies whether or not the file may be exectued with the privileges of the file's owner.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="sgid" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The sgid field specifies whether or not the file may be executed with the privileges of the file's group owner.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="uread" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The uread field specifies whether or not the owner of the file can read its contents.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="uwrite" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The uwrite field specifies whether or not the owner of the file can write to it.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="uexec" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The uexec field specifies whether or not the owner of the file can execute it.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="gread" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The gread field specifies whether or not the group owner of the file can read its contents.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="gwrite" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The gwrite field specifies whether or not the group owner of the file can write to it.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="gexec" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The gexec field specifies whether or not the group owner of the file can execute it.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="oread" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The oread field specifies whether or not all other users can read the contents of the file.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="owrite" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The owrite field specifies whether or not all other users can write to the file.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
				<xs:attribute name="oexec" type="xs:boolean">
					<xs:annotation>
						<xs:documentation>The oexec field specifies whether or not all other users can execute the file.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="UnixFileType">
		<xs:annotation>
			<xs:documentation>UnixFileType specifies Unix file types, via a union of the UnixFileTypeEnum type and the atomic xs:string type. Its base type is the CybOX Core BaseObjectPropertyType, for permitting complex (i.e. regular-expression based) specifications.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="cyboxCommon:BaseObjectPropertyType">
				<xs:simpleType>
					<xs:union memberTypes="UnixFileObj:UnixFileTypeEnum xs:string"/>
				</xs:simpleType>
				<xs:attribute name="datatype" type="cyboxCommon:DatatypeEnum" fixed="string">
					<xs:annotation>
						<xs:documentation>This attribute is optional and specifies the expected type for the value of the specified property.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:simpleType name="UnixFileTypeEnum">
		<xs:annotation>
			<xs:documentation>The UnixFileTypeEnum type is an enumeration of file types used by the Unix family of operating systems. These file types can be determined via the output of the ls and stat commands.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="regularfile">
				<xs:annotation>
					<xs:documentation>Specifies a regular file, denoted in UNIX by the first dash (-) in a file with permissions -rw-r--r--.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="directory">
				<xs:annotation>
					<xs:documentation>Specifies a directory, denoted in UNIX by the d in a file with permissions drw-r--r--.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="socket">
				<xs:annotation>
					<xs:documentation>Specifies a socket, denoted in UNIX by the s in a file with permissions srw-r--r--.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="symboliclink">
				<xs:annotation>
					<xs:documentation>Specifies a symbolic link, denoted in UNIX by the l in a file with permissions lrw-r--r--.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="blockspecialfile">
				<xs:annotation>
					<xs:documentation>Specifies a block device, such as /dev/sda, denoted in UNIX by the b in a file with permissions brw-rw----.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="characterspecialfile">
				<xs:annotation>
					<xs:documentation>Specifies a character device, such as /dev/null, denoted in UNIX by the c in a file with permissions crw-------.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
