Blog 6: Linux Permissions, SSH & Service Management – DevSecOps Foundations
Blog 6: Linux Permissions, SSH & Service Management – DevSecOps Foundations
By
| 🛡️ All Rights Reserved🧑💻 Why This Blog Matters
As a DevSecOps engineer, you’ll often deal with Linux file permissions, secure server access, and managing services like SSH or Nginx. These aren’t just admin tasks — they form the backbone of cloud security, automation, and infrastructure control.
🔐 1. File & Folder Permissions
Numeric System
Permission | Code | Meaning r | 4 | Read w | 2 | Write x | 1 | Execute
Example:
-rw-r--r-- 1 ec2-user ec2-user myfile.txt
- Owner: Read & Write
- Group: Read only
- Others: Read only
Commands
chmod o+w file.txt chmod o-r file.txt chmod ugo+rwx file.txt chmod 740 file.txt
🧑🚀 2. SSH Key-Based Login
Steps
- Create .ssh directory
- Set ownership to user
- Create authorized_keys file and set permissions
- Login using:
ssh -i kalyan.pem kalyan@IP
📦 3. Package Management
dnf install nginx -y dnf remove nginx dnf list installed dnf list available
🛠️ 4. Service Management
systemctl status sshd systemctl start nginx systemctl stop nginx systemctl restart nginx systemctl enable nginx
🔍 5. Process & Network Management
ps -ef | grep nginx kill PID kill -9 PID netstat -lntp
✅ Summary
- chmod, chown = Control file access
- SSH key setup = Login without password
- dnf & yum = Manage software
- systemctl = Manage services
- kill & netstat = Monitor processes and ports
Comments
Post a Comment