Why Linux Says “Permission denied” and How to Fix It: A Beginner’s Journey
The article shares a personal Linux learning journey, explaining why permission errors occur, how to interpret file permissions, navigate the file system, diagnose processes, services, logs, and network issues, and adopt a mindset that treats Linux as a precise, rule‑based system rather than an adversary.
Part 1: Permissions – The First Wall for Newbies
When the author ran ./backup.sh they received bash: ./backup.sh: Permission denied. Adding sudo made it work but felt like cheating. A senior engineer asked, “Do you know who owns the file?” Running ls -l backup.sh showed -rw-r--r-- 1 pawan pawan 2456 backup.sh, indicating read/write permission for the owner but no execute bit. Adding the execute permission with chmod +x backup.sh allowed the script to run, illustrating that Linux follows explicit permission rules.
Part 2: The File System – Mapping Linux’s Structure
Linux does not hide files; it organizes them:
Configuration files: /etc Log files: /var/log User data: /home Executable binaries: /bin and /usr/bin Understanding this hierarchy turns the apparent chaos into a navigable map.
Part 3: Processes – The Invisible Crowd Inside Your System
A slow system prompted the author to run top, revealing CPU and memory usage and rogue processes. Using ps aux | grep java identified the offending process, showing that Linux itself is fast; a misbehaving process is the culprit.
Part 4: Services – Diagnosing “Yesterday It Worked” Failures
When a web server failed to start, the author checked its status with systemctl status nginx, discovered a missing configuration file, fixed it, and restarted the service using systemctl restart nginx. The issue was resolved by asking the right diagnostic question.
Part 5: Logs – Linux Always Leaves a Trail
Contrary to the belief that Linux hides errors, the system records everything. The author used journalctl -xe or tail -f /var/log/syslog to view detailed logs, learning that each crash leaves a trace.
Part 6: Network – Turning Mystical Connectivity Issues into Logic
Even when a service was running and ports were open, connections could fail. Basic checks included ip a, ss -tuln, and ping google.com. Firewall rules were inspected with firewall-cmd --list-all, turning network debugging into a systematic process.
Part 7: Mindset Shift – From Fighting Linux to Understanding It
The author concludes that Linux is honest and does not make assumptions. By stopping the fight and learning the system’s rules, one gains perception and confidence, turning frustration into mastery.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
