File Permissions and Access Control Lists

File Permissions and Access Control Lists

ยท

2 min read

Day-4 #90daysofdevops

๐Ÿ“ Introduction

๐Ÿ“Œ Task - 1 File Permissions ๐Ÿ”’
๐Ÿ“Œ Task - 2 Access Control List (ACL) ๐Ÿ”‘

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.

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

chmod Linux command used to change file permissions.

Changing user permission of the file

chmod u+rwx myfile.txt

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.

To check the ACL of cloude folder

getfacl cloude/

Assigned acl

#setfacl -m u:vishal:rwx cloude/

#getfacl cloude/

ย