File Permissions and Access Control Lists

I'm Proficient in a variety of Big Data technologies, including AWS, Azure, GCP, Hadoop, Databricks, Pyspark, Sql, Python, Docker, Jenkins, Git/GitHub, Kubernetes, Azure Data Engineering.
All three owners (user owner, group, others) in the Linux system have three types of permissions defined.
Read (r) : The read permission allows you to open and read the content of a file. But you can't do any editing or modification in the file.
Write (w) : The write permission allows you to edit, remove or rename a file. For instance, if a file is present in a directory, and write permission is set on the file but not on the directory, then you can edit the content of the file but can't remove, or rename it.
Execute (x): In Unix type system, you can't run or execute a program unless execute permission is set. But in Windows, there is no such permission available.
Changing Permissions
To change the file or the directory permissions, you use the chmod (change mode) command. There are two ways to use chmod — the symbolic mode and the absolute mode.
Using chmod in Symbolic Mode

Using chmod with Absolute Permissions

Access Control Lists(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.
setfacl and getfacl are used for setting up ACL.
Tasks -
1) Create a simple file and do ls -ltr to see the details of the files -

Each of the three permissions is assigned to three defined categories of users. The categories are:
Owner - The owner of the file
Group - The group that owns the file
Others - All users with access to the system
2) As a task, change the user permissions of the file and note the changes after ls -ltr

3) Try out the commands getfacl and setfacl


Thank you for reading.
Bikram Chatterjee




