---
title: FilePermissions
framework: system
role: symbol
role_heading: Structure
path: system/filepermissions
---

# FilePermissions

The access permissions for a file.

## Declaration

```swift
@frozen struct FilePermissions
```

## Overview

Overview The following example creates an instance of the FilePermissions structure from a raw octal literal and compares it to a file permission created using named options: let perms = FilePermissions(rawValue: 0o644) perms == [.ownerReadWrite, .groupRead, .otherRead] // true

## Topics

### Owner Permissions

- [ownerRead](system/filepermissions/ownerread.md)
- [ownerWrite](system/filepermissions/ownerwrite.md)
- [ownerExecute](system/filepermissions/ownerexecute.md)
- [ownerReadWrite](system/filepermissions/ownerreadwrite.md)
- [ownerReadExecute](system/filepermissions/ownerreadexecute.md)
- [ownerWriteExecute](system/filepermissions/ownerwriteexecute.md)
- [ownerReadWriteExecute](system/filepermissions/ownerreadwriteexecute.md)

### Group Permissions

- [groupRead](system/filepermissions/groupread.md)
- [groupWrite](system/filepermissions/groupwrite.md)
- [groupExecute](system/filepermissions/groupexecute.md)
- [groupReadWrite](system/filepermissions/groupreadwrite.md)
- [groupReadExecute](system/filepermissions/groupreadexecute.md)
- [groupWriteExecute](system/filepermissions/groupwriteexecute.md)
- [groupReadWriteExecute](system/filepermissions/groupreadwriteexecute.md)

### Other Permissions

- [otherRead](system/filepermissions/otherread.md)
- [otherWrite](system/filepermissions/otherwrite.md)
- [otherExecute](system/filepermissions/otherexecute.md)
- [otherReadWrite](system/filepermissions/otherreadwrite.md)
- [otherReadExecute](system/filepermissions/otherreadexecute.md)
- [otherWriteExecute](system/filepermissions/otherwriteexecute.md)
- [otherReadWriteExecute](system/filepermissions/otherreadwriteexecute.md)

### Special Permissions

- [setUserID](system/filepermissions/setuserid.md)
- [setGroupID](system/filepermissions/setgroupid.md)
- [saveText](system/filepermissions/savetext.md)

### Interacting with C APIs

- [init(rawValue:)](system/filepermissions/init(rawvalue:).md)
- [rawValue](system/filepermissions/rawvalue.md)
- [CModeT](system/cmodet.md)

### Debugging

- [description](system/filepermissions/description.md)
- [debugDescription](system/filepermissions/debugdescription.md)

### Default Implementations

- [CustomDebugStringConvertible Implementations](system/filepermissions/customdebugstringconvertible-implementations.md)
- [CustomStringConvertible Implementations](system/filepermissions/customstringconvertible-implementations.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [Hashable](swift/hashable.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Files

- [FileDescriptor](system/filedescriptor.md)
- [FilePath](system/filepath.md)
