Linux Basics /

Read Restricted Files

MEDIUM1 task

Linux File Permissions

Every file in Linux has an owner and permissions controlling who can read, write, or execute it.

ls -la shows permissions like this:

-rw-r--r-- 1 root root 42 Aug 30 12:00 secret.txt

Breaking it down:

  • rw- = owner can read and write
  • r-- = group can read only
  • r-- = everyone else can read only

Misconfigurations

Administrators sometimes set permissions incorrectly, leaving sensitive files readable by everyone.

Your Mission

A file containing credentials has been left world-readable by mistake. Find it and read it.

Look in /etc and /var/www for files with interesting names that you should not normally be able to read.

Command

ls -la /etc | grep -v "root root"

This shows files not owned by root — potential misconfigurations.

Answer the questions below

Room Progress0 / 25 pts
0/1 tasks complete

Find a world-readable sensitive file on the server. Read it and find the flag inside.

💡 Show hint

Check /etc and /var/www for files readable by everyone. Try: find / -perm -o+r -name '*.conf' 2>/dev/null

No target
No target machine for this room.