Monday, 1 April 2024

Permissions in Linux

1. What to use Permissions for?
Permission is what user, group can do with file, fold

2. How to use Permissions?

Concepts about permission

- 04 types of permissions: rwx- : read (r), write (w), and execute (x), - (none)
- 03 types of who has permissions: Owner, Group, Others 
- 02 types of representations permission:
+ Octal Representation: Read (4) Write (2) Execute (1) => 644 means:
/ Owner can read (4) + write (2)
/ Group can read (4)
/ Others can read (4)
+ Symbolic Representation: r: Read; w: Write; x: Execute; d: Directory; -: Regular file; s: Setuid or setgid; t: Sticky bit; => drwxr-xr-- means:
/ Owner can read, write, and execute (rwxz
/ Group can read, execute, not write (r-x).
/ Others can rad, not write & execute (r--)

Managing Users and Groups

- To manage users: useradd, usermod, userdel
- To manage groups: groupadd, groupmod, groupdel.

Managing Permission for Uses and Groups

- To change the access permissions of files and directories using: chmod
- To change the ownership of files and directories using: chown

Sudo permission

- To allows users to execute commands with the privileges of another user (usually the system administrator) using: sudo
- Edit the /etc/sudoers file to configure sudo access rights (sudo nano /etc/sudoers)

3. What does Permissions include? 

--------------------------
Detailed instructions

Thank you

No comments:

Post a Comment

Golang Advanced Interview Q&A