🚀 Day 2 of My DevOps Journey – File Permissions, Ownership, and First GitHub Push

Ritesh SinghRitesh Singh
3 min read

👋 Recap & Focus

After completing Linux basics on Day 1, today I explored file permissions, user/group ownership, and practiced Git & GitHub for the first time. These are critical skills for any DevOps role — they help secure systems and manage collaboration on real-world projects.


🔐 Linux File Permissions with chmod

I started with understanding how Linux permissions work — specifically read (r), write (w), and execute (x) for user, group, and others.

🔧 Commands I used:

chmod +x script.sh       # Add execute permission
chmod 755 run.sh         # Common for scripts (rwxr-xr-x)
chmod u+x file.txt       # Execute only for owner
chmod go-w notes.txt     # Remove write for group and others

I practiced giving/removing permissions, checking effects using ls -l, and understanding the difference between symbolic (u+x) and numeric (755) modes.


👤 File Ownership with chown and chgrp

Then I learned to manage who owns a file or directory, and how group ownership affects file access.

🔧 Key Commands:

sudo chown ritesh file.txt               # Change owner
sudo chown ritesh:devops script.sh       # Change owner and group
chgrp devops file.txt                    # Change group
sudo chown -R ritesh:ritesh myfolder/    # Recursively change

By switching between users and groups, I was able to test file access control in a realistic Linux environment.


🧪 Permission Lab Setup

To solidify everything, I created a permissions lab:

  • 3 users: ritesh, testuser1, testuser2

  • Created files with different permissions

  • Tested access: which user could read, write, or execute

  • Used umask to understand default file permission behavior

This hands-on approach helped me understand real-world scenarios like how DevOps engineers control access on production servers.


📝 Commands Used in Lab

sudo adduser testuser
su - testuser
whoami
id
groups
umask

I documented all behaviors, output, and permission logic in my Day2.md.


📘 Created a Cheatsheet

To make things easier going forward, I created a cheatsheet.md file summarizing every important command and when to use it.

CommandDescriptionExample
chmodChange permissionchmod 755 file.sh
chownChange ownerchown ritesh file.txt
chgrpChange groupchgrp devops file.txt
idShow user ID, group IDid
umaskShow default permissionsumask

💾 First Git & GitHub Push

Finally, I initialized my Git repository and pushed my files to GitHub — marking my first official public DevOps project.

git init
git add .
git commit -m "Add Day2 file permissions and lab"
git remote add origin https://github.com/ritesh355/devops-journal.git
git push -u origin main

✅ Now my daily learning is version-controlled and visible on GitHub. Huge milestone!


🔮 What's Next (Day 3 Preview)

Tomorrow, I’ll focus on process management and system monitoring in Linux:

  • Commands like ps, top, htop, kill, df, uptime

  • Running background processes and tracking performance

  • Creating a full process report


📦 Repository

📍 GitHub Repo – devops-journal


🙌 Final Reflection

“Mastering file permissions isn’t just about commands — it’s about system control. And pushing my first GitHub commit made me feel like a real DevOps engineer.”


Thank you for reading! Let’s connect if you’re also learning DevOps:

#devops #linux #git #github #100DaysOfDevOps #learninginpublic #filepermissions #selftaught

0
Subscribe to my newsletter

Read articles from Ritesh Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ritesh Singh
Ritesh Singh

Hi, I’m Ritesh 👋 I’m on a mission to become a DevOps Engineer — and I’m learning in public every single day.With a full-time commitment of 8–10 hours daily, I’m building skills in: ✅ Linux✅ Git & GitHub✅ Docker & Kubernetes✅ AWS EC2, S3✅ Jenkins, GitHub Actions✅ Terraform, Prometheus, Grafana I post daily blogs on Hashnode, push projects to GitHub, and stay active on LinkedIn and Twitter/X. Let’s connect, collaborate, and grow together 🚀 #100DaysOfDevOps #LearningInPublic #DevOps