# File Permissions and Access Control Lists

## Introduction

In this blog, we explore Files Permissions and ACL in Linux

## Task - 1 File Permissions

In Linux, file permissions determine who can access a file and what actions they can perform on it. file permissions in Linux help protect and control access to files and directories, ensuring that only authorized users can read, modify, or execute them.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690182586730/aaa768b0-70af-4e0b-8459-bf8e349acb15.webp align="center")

owner - The user who owns the file.

Group - Users who belong to the same group as the file.

Others - All users who are not the owner and not in the group of the file.

### Create a simple file and do ls -ltr to see the details of the files

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690191164099/38f0d0f0-32d5-4db0-8234-fad78d965e7a.png align="center")

```basic
chmod Linux command used to change file permissions.

## Changing user permission of the file

chmod u+rwx file1.txt  
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690191322920/e364f062-66c6-4377-b52a-7608f7cb386a.png align="center")

## Task - 2 Access Control List (ACL)

ACL stands for Access Control List. It is a mechanism that allows more fine-grained control over file and directory permissions. ACLs provide a way to assign permissions to specific users or groups beyond what is allowed by default.

```basic
# To check the ACL of Day6 folder

getfacl Day6/    
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690193080117/3d249b7c-9f2c-4bf1-adb7-61aa9e2405c2.png align="center")

```basic
# Assigned acl

setfacl -m u:nik:rwx Day6/
getfacl Day6
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690204788804/b83a9a7c-3213-4d78-b58f-7c968e94d70e.avif align="center")
