Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Working in the Customer's Systems  ›  Lesson

Linux on Machines You Don't Own

Linux Skills 14 minOn a customer's Linux server you read disk space, service status and logs before changing anything, make the smallest agreed change, and record every command.

Linux on Machines You Don't Own

Detention charges are checked against the depot gate log, the record of when each truck arrived and left. Every night Harbourline's gate system writes that log to an SFTP server, and your pipeline reads it each morning. For two days no file has appeared, and detention checks have stalled. The server, sftp01, is a Linux machine in Harbourline's data centre. You have a login through their jump host, and on that machine you are a guest.

The rule

Look before you touch; change the least; write down everything.

  • Look before you touch. Start with commands that only read: disk space, service status, logs, file listings. Most problems explain themselves if you look first.
  • Change the least. Make the smallest change that fixes the problem, and get the owner's agreement before you make it. This is their production machine, not your laptop.
  • Write down everything. Keep a log of every command you ran and why. Harbourline IT can then audit it, repeat it or undo it.

The everyday toolkit is small:

ssh -J you@jump.harbourline.internal you@sftp01  # log in via the jump host
df -h                                  # how full is each disk?
ls -lt /data/exports | head            # newest files first
systemctl status gatelog-export        # did the export service run?
journalctl -u gatelog-export --since yesterday   # its recent log lines

Permissions matter on shared machines. ls -l shows each file's owner and who may read or write it. A file whose permissions read -rw------- and whose owner is gatelog can be read and written by that user alone. A pipeline running as any other user cannot open it.

The shortcut

Three looks before one change: space, service, logs. A failed job on a Linux server very often explains itself in one of those three places.

The missing nightly fileStep 1 of 5
  1. Space

    df -h shows the /data disk at 100% full. Two years of old export files were never cleaned up.

The trap is the fast fix: sudo rm -rf on a folder you believe is safe, or restarting services until something works. On someone else's server, one fast mistake can cost the whole engagement.

Drills

Answer fast — trust the rule.

quick drill

Which command shows how full each disk is?

quick drill

A nightly job has failed on a Harbourline server. What is your first move?

quick drill

A file's permissions read -rw------- and its owner is gatelog. Your pipeline runs as the user loomwork. Why can't it read the file?

quick drill

Which command lists a folder's files with the newest first?

quick drill

Why keep a log of every command you run on a customer's server?

Remember

  • Look before you touch; change the least; write down everything.
  • Shortcut: three looks before one change: space, service, logs.
  • Trap: fast, destructive fixes such as rm -rf or blind restarts on someone else's server.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWhat did you do on sftp01?

Kavitha, Harbourline's IT security lead, asks what you did on sftp01. Explain step by step what you checked, what you changed and why you did not simply delete the old files.