File Permission and Access Control Lists ๐
Create a simple file and do ls -ltr
to see the details of the file.
File Permission
File permissions are a set of rules that determine how files and directories can be accessed.
File permissions are categorized into three main types:
Read (r): Allows users to view the contents of a file or the names of files within a directory.
Write (w): Grants users the ability to modify the contents of a file or create, delete, and rename files within a directory.
Execute (x): Permits the execution of a file as a program or script. For directories, it allows users to access and navigate the directory.
๐ACL: Access Control Lists
Access Control list is used to control the access of files and directories.
overview of the getfacl
and setfacl
commands:
getfacl:
The getfacl
command is used to display the ACLs (Access Control Lists) of files and directories.
getfacl file_name.txt
setfacl:
The setfacl
command is used to set or modify ACLs for files and directories.
setfacl -m u:user_name:rw file_name.txt
Subscribe to my newsletter
Read articles from Raqeeb Ahmed Khan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by