Hosting Operations
Read-onlyCheck the Active Release Symlink
A deployment uses release directories and a current symlink, and you need to confirm which release is active.
Command
readlink /srv/www/example/current && cat /srv/www/example/current/VERSION
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not assume Git HEAD and the active release symlink always match.
Expected output
The current symlink target and VERSION file for release 2026-06-25-1030.
System impact
Read-only. Nothing changes. The symlink target and release metadata are printed.
Recovery / rollback: no state is changed.
When to use it
Use during deploy or rollback triage when production is selected by a filesystem pointer.
When not to use it
Do not assume Git HEAD and the active release symlink always match.
next steps
Related commands
Check the Nginx Site Symlink Target
Verify which release or document root symlink Nginx is serving before changing deploy links.
readlink -f /srv/www/example.com/current
Find Release Files Writable Outside the Owner
A release file that someone besides the owner can modify deserves a second look.
find /srv/www/example/releases/current -type f -perm /0022 -printf '%M %u:%g %p\n' 2>/dev/null | sort
Rollback a Release Symlink in a Sandbox
Practice the pointer switch where the blast radius is zero.
ln -sfn /srv/www/example/releases/2026-06-25-1000 /tmp/linuxoneliners-current-release
Audit a Symlink Permission Chain
A symlink can make the path you audited different from the file the app opens.
find /srv/www/example -type l -printf '%p -> %l\n' -exec namei -l {} \; 2>/dev/null
Group Writable Files by Owning Group
Group-writable files are not automatically wrong, but the owning group decides the risk.
find /srv/www/example -type f -perm -0020 -printf '%g %M %p\n' 2>/dev/null | sort
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.