Day 6 : Task- File Permissions and Access Control Lists

Day 6 : Task- File Permissions and Access Control Lists

Today is more on Reading, Learning and Implementing File permissions.

ยท

2 min read

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

touch file.txt
ls -ltr

2.Write an article about File Permissions based on your understanding from the notes.

File permissions control access to files and directories in Unix-like operating systems (e.g., Linux, macOS). They define what actions users and groups can perform on a particular file or directory. There are three types of permissions: read, write, and execute, which can be assigned to three different entities: the file owner, the group, and others (everyone else). Here's an overview of file permissions:

  1. Read (r): If a user has read permission for a file, they can view the contents of the file. For directories, read permission allows a user to list the files and directories inside it.

  2. Write (w): Write permission allows a user to modify the contents of a file. For directories, write permission allows a user to create, delete, or rename files and directories inside it.

  3. Execute (x): Execute permission is applicable to executable files and directories. For executable files, it allows users to run the program. For directories, execute permission allows a user to enter (i.e., access) the directory and access the files inside it. Without execute permission on a directory, a user won't be able to navigate into it, even if they have read permission.

File permissions are represented using a combination of characters when listing files using the ls -l command. Here's how the permissions are displayed:

3.Read about ACL and try out the commands getfacl and setfacl

ACLs (Access Control Lists) provide more fine-grained access control compared to traditional file permissions. With ACLs, you can assign specific permissions to individual users or groups beyond the standard owner, group, and others.

ACLs are represented using an extended syntax that includes additional access permissions and qualifiers, such as read-data, write-data, execute, delete, and more. The getfacl command displays ACL information and the setfacl command allows you to modify ACLs.

First of all, install acl by using sudo apt install acl

The getfacl and setfacl commands are used to modify and view ACLs.

Thank you for reading! ๐Ÿ™ Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.

ย