## Filesystem Permissions
```bash
$ ls -l swap.c
-rw-r--r--. 1 mirek mirek 266 feb 16 06:36 swap.c
===~~~+++
| | |
| | +-- Other (r--)
| +----- Group (r--)
+-------- Owner (rw-)
```
![](images/file.permissions.png)
```cpp
enum permissions{
S_IROTH = 4, // read by others
S_IWOTH = 2, // write by others
S_IXOTH = 1 // execute by others
};
```
```cpp
bool is_executable(int permissions){
if(permissions & S_IXOTH){
return true;
}else{
return false;
}
};
```