Hosting Operations
Read-onlyRollback a Release Symlink in a Sandbox
You need to rehearse a symlink-style rollback by pointing current at the previous stable release directory.
Command
ln -sfn /srv/www/example/releases/2026-06-25-1000 /tmp/linuxoneliners-current-release
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not run this against a real production releases directory unless your deployment process explicitly calls for it.
Expected output
The current symlink resolves to 2026-06-25-1000 and its VERSION status is stable.
System impact
Read-only. The releases/current symlink inside the disposable example points to 2026-06-25-1000.
When to use it
Use in a sandbox or controlled deploy path when rollback is implemented by moving a current symlink.
When not to use it
Do not run this against a real production releases directory unless your deployment process explicitly calls for it.
Recovery / rollback
Point releases/current back to 2026-06-25-1030 or recreate the example.
next steps
Related commands
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
Check the Active Release Symlink
Git may say one thing while the release pointer serves another.
readlink /srv/www/example/current && cat /srv/www/example/current/VERSION
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
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
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.