Three digits for owner / group / everyone. Each digit adds read (4) + write (2) + execute (1). 755 = owner can do everything, others can read and run. 777 lets anyone on the server change the file, so one hacked service can overwrite your code.
Say it like this in the interview
“Octal permissions for user, group and others. 755 is typical for directories and scripts, 644 for files. 777 is a security risk; the right fix is correct ownership with chown to the web server user, not wider permissions.”
Go from the outside in: is the machine healthy, is the service running, what do the logs say?
uptime; free -h; df -h # load, memory, disk full?
systemctl status nginx php-fpm # services running?
journalctl -u nginx --since "10 min ago"
tail -n 100 /var/log/nginx/error.log
ss -tlnp # is anything listening on 80/443?
top / htop # what's eating CPU/memory?
curl -I localhost # does it respond locally?
Say it like this in the interview
“Load, memory and disk (a full disk breaks everything), then service status, then the error logs, then whether the ports are listening and the app responds locally, and DNS/firewall if it’s fine locally. I also check what changed recently. After fixing, I add monitoring for whatever failed.”
du -h --max-depth=1 / 2>/dev/null | sort -h | tail
find /var/log -type f -size +100M
journalctl --vacuum-size=500M
In simple words
Find the biggest folders, step by step, then clean safely: usually logs, backups or caches.
Say it like this in the interview
“du to find large directories, usually logs, old backups, Docker images or caches. I clean safely, set up logrotate, and check for deleted-but-open files with lsof +L1, since space isn’t freed until the process closes them.”
Something is overloaded: CPU, disk or waiting on I/O. Find which process and which resource.
Say it like this in the interview
“top or htop to see CPU and processes, iostat or iotop for disk I/O wait, free -h and swap usage for memory pressure, vmstat overall. High load with low CPU usually means I/O wait. Then look at the specific process’s logs.”
Cron runs commands on a schedule written as five fields: minute, hour, day of month, month, day of week.
Say it like this in the interview
“crontab -e, then a line like 0 2 * * * /usr/bin/backup.sh >> /var/log/backup.log 2>&1 for 2am daily. Use absolute paths, since cron has a minimal environment, and log output.”
You have a key pair: the private key stays on your computer, the public key goes on the server. The server checks you have the matching private key without it ever being sent.
Say it like this in the interview
“Asymmetric keys: the server verifies a signature made with my private key. They resist brute force, can be passphrase-protected and revoked per key. I disable password login and root login on servers.”