Day 6 - File Permissions and Access Control Lists
Table of contents
➡File Permissions
- Create a simple file and do
ls -ltr
to see the details of the files
Each of the three permissions are assigned to three defined categories of users. The categories are:
owner — The owner of the file or application.
"chown" is used to change the ownership permission of a file or directory.
group — The group that owns the file or application.
"chgrp" is used to change the group permission of a file or directory.
others — All users with access to the system. (outised the users are in a group)
"chmod" is used to change the other users permissions of a file or directory.
➡Access Control Lists(ACL) in Linux
What is ACL ?
Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. ACL allows you to give permissions for any user or group to any disc resource.
Use of ACL :
Think of a scenario in which a particular user is not a member of group created by you but still you want to give some read or write access, how can you do it without making user a member of group, here comes in picture Access Control Lists, ACL helps us to do this trick.
setfacl and getfacl are used for setting up ACL and showing ACL respectively.
getfacl file1.txt
setfacl -m u:UserA:rwx file1.txt
Thanks for taking the time to read! 😊
Subscribe to my newsletter
Read articles from Sarika Kamble directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Sarika Kamble
Sarika Kamble
👋 Hello, and welcome to my DevOps journey! 🚀 I'm Sarika Kamble, passionate about all things AWS DevOps Technology. Currently, on a learning adventure, I'm here to share my journey and Blogs in the world of cloud and DevOps. I'll be sharing my learnings, experiences, and adventures as I dive deep into the world of continuous integration, automation, and cloud technologies. ☁️⚙️ Let's connect, learn, and grow as a vibrant DevOps community. Follow my Hashnode blog, and let's embrace the DevOps adventure together! 🤝🔗 Follow me on LinkedIn: https://www.linkedin.com/in/sarika-kamble-3153b3218/