Day 4 #90DaysOfDevOps
Hemant is a Microsoft certified SharePoint Administrator and Power platform developer with 16+ years extensive experience in IT, Microsoft SharePoint. He has decade involved providing M365 and SharePoint for business problems across nearly all industries and commercial sectors. Also he involved in Management/Leadership of Projects in Energy, Healthcare, Content Management, Mining domain, gaining extensive expertise in Project Lifecycle Management, Agile Development, DevOps Testing Cycle as well as Team Management
• Expertise in all aspects of the SharePoint Administration, installation, configuration, development, architecture, deployment and Migrations
• Experienced in developing collaboration and power platforms, portals, enterprise search, enterprise content management, business processes of SharePoint in large enterprise environments.
• Providing day-to-day administration and support on monitoring, usage and growth analysis and patching on SharePoint intranet and Internet.
• Adopting new technology and implementing them, in-depth functional knowledge with appreciation for technical skills.
• Have been involved in various phases of SDLC including analysis, design, coding, testing and implementation mainly Agile development
• Collaborated in governance development and processes, enhancing system efficiency and adherence to best practice. Improving SharePoint capabilities by evaluating and integrating third-party solutions
Programming and Scripting: Proficient in PnP PowerShell scripting for automation and customization.
Learn more about these cloud projects by visiting my portfolio at https://medium.com/@risbud
Technologies interested Cloud | MultiCloud | AWS | DevOps | Microsoft Azure | Google Cloud | Terraform | Ansible
Understanding Linux file permissions and ownership is a crucial aspect of working with Linux systems. In this session, we will delve into the world of Linux permissions and ownership, and engage in practical tasks related to both. Let's begin by exploring the realm of Permissions.
For more versatile and fine-grained control over file and directory permissions, Access Control Lists (ACLs) offer a modern approach. They provide an alternative to the traditional Unix file permissions, making them particularly useful in scenarios where precise control is required. To manage ACLs, you can utilize the "setfacl" command, and to view and display the Access Control List (ACL) of a file or directory, the "getfacl" command comes into play.
👉Linux file permissions 📄
The file can have three types of permissions
read (r) 📖
write (w) ✍️
execute (x) 🏃♂️
Whenever you run ls -l you see the permissions for each file at the start of the line

This string has 🔟 characters and is available for each file, divided into 4️⃣ parts


The first character represents what kind of file it is,
dfor directory files and-for normal filesThe next three parts are permission for each kind of role, user, group, and other
1 is the number of links of the file or in simple words showing there is one file linking to test.txt.
The file belongs to user ubuntu and group ubuntu.
0 is the file size as there are no contents in the file.
Next is the date and time the file was created.
The last one is the file name, test.txt.
Each file and directory has three user-based permission groups
Owner- This is the owner of the file or the directory.
Group - These group permissions apply only to the group that has been assigned to the file or directory.
Other - These permissions apply to all other users on the system.
There are two methods to change permissions of user, group or other
Symbolic mode +-=
+represents add-represents remove+ and - are useful to remove or add any permission for any role without affecting other permissions
=is used to set the permissions= is useful if you want to override existing permissions for a specific role
ufor usergfor groupofor otherafor allchmod u+x file--> Add execute permission for userSee the image below there was no execute permission for the user earlier on the test.txt file, but after executing the above command user got execute permission

chmod g-w file1 file2--> Remove write permission for group two filesMultiple files can be provided in the command

chmod u+r,g+x file--> Add read for a user and add execute for groupMultiple roles with multiple permissions can be given at the same time

chmod a=rwx file--> Give all permissions to all role
Numeric mode (0️⃣to7️⃣)
The digits from 0 to 7 represent different combinations of permissions
This will override the existing permissions for other roles as well
Binary reference uses numbers.
Each permission type has a number:
read (r) = 4
write (w) = 2
execute (x) = 1
Just remember this permission chart


chmod 205 file --> 2 (write) for user, 0 (no) for group, 5 (read & execute) for other

chmod 350 file --> 3 (write & execute) for user, 5 (read & execute) for group, 0 (no) for other

👉 File Ownership 👤👥
To change permissions
chowncommand is usedIf you are a user or group owner of a file then no need to use
sudobeforechown
There are two types of owners for each file
User Owner
Group Owner
Whenever you run ls -l you can see the owner for each file in the 3rd and 4th columns i.e user owner & group owner
Change user owner 👤
chown <username/UID> file --> Change user owner using username or UID
chown <username/UID> file1 file2 --> Change user owner for multiple files

Change group owner 👥
sudo chown :<groupname/GID> file --> Change group owner using group name or GID
Multiple files can be given in the command

Change both owners 👤👥
sudo chown <username/UID>:<groupname/GID> file --> Change both owners
Multiple files can be provided in the command
Any combination of ID and name works

Properly configured file permissions and ownership are essential for maintaining the confidentiality, integrity, and availability of your data.
Happy Learning !!! 👋



