Skip to main content

1700

Sticky Bit + 700

1700 combines:

  • **Sticky Bit (1) only file owner/root can delete files in directory
  • Owner: rwx
  • Group: --
  • Others: --

Effect: Owner-only full access, group and others have zero access, and sticky prevents other users from deleting files if they ever gained write access.

This mode is essentially **private secure directory with sticky protection extremely restrictive.

Typical usage: **private temp/work directory for a privileged service account, not for WordPress runtime folders.

Objective

Learn 1700 behavior, its niche use for isolated secure workspaces, and why it does not belong inside public WordPress paths.

Concept Breakdown

Octal Structure

DigitMeaning
1Sticky bit
7Owner rwx
0Group ---
0Others ---

Behavior

ActionResult
OwnerFull control
GroupNo access
OthersNo access
DeletionOnly owner deletes files

Syntax Formula

Apply 1700

chmod 1700 <directory>

Remove sticky bit

chmod -t <directory>

Verify

ls -ld <directory>

Permission Indicator

drwx------T

Capital T = sticky bit + no execute for others.

Practical Example

Secure private ops workspace:

mkdir /srv/private-tmp
chmod 1700 /srv/private-tmp
ls -ld /srv/private-tmp

Expected:

drwx------T ... /srv/private-tmp

Only owner can access & delete.

WordPress-Relevant Usage

ScenarioValidNotes
Private secure admin workspace✅ Good internal use
WP public content dirs❌ Not allowed
Uploads / cache❌ Breaks site
Shared hosting❌ Irrelevant pattern
Dedicated privileged scripts dir✅ If private & isolated

WP Production Scenarios

CaseRecommendation
Internal admin scratch folderGood
Private temp for automation accountValid
Any web folderNever
WP-owned dirsAvoid; use WP standard perms

Security Considerations

Benefits

BenefitWhy
Private secure directoryOwner-only access
Sticky prevents delete by non-rootAdded layer

Risks

RiskWhy
Misuse in WP treeSite breaks
False sense of securitySticky ≠ malware protection
Loss of usabilityOnly owner sees files

Audit:

find / -type d -perm -1000 2>/dev/null

Fix:

chmod -t <dir>
chmod 700 <dir>

Best Practices

PracticeReason
Use only for internal system/admin dirsProper isolation
Do not apply in /home/*/public_htmlWP will fail
Prefer least-privilege user per siteStronger security
Use ACL for needed shared accessModern approach

WordPress Audit

Scan WP tree:

find /home -perm -1000

If seen inside web path:

chmod -t <dir>
chmod 755 <dir> # reset for WP dirs

Go-Live Checklist

Requirement
Sticky only on private dirs
Not inside WordPress folders
Owner-only workspace confirmed
ACL policies applied as needed

Troubleshooting Matrix

SymptomCauseFix
Other users can't accessIntendedChange perms if needed
WP fails to write/uploadSticky in web pathReset perms
Cannot delete some filesSticky effectRemove -t

Quick Lab

Create a private script staging folder:

useradd ops
mkdir /srv/ops-lab
chown ops:ops /srv/ops-lab
chmod 1700 /srv/ops-lab

Expected:

drwx------T ... /srv/ops-lab

Cheat Sheet

CommandPurpose
chmod 1700Sticky + 700
chmod -tRemove sticky
find / -perm -1000Audit sticky dirs
ls -ldCheck for T

Mini-Quiz

QuestionAnswer
Meaning of 1 in 1700?Sticky bit
Who can delete files?Owner or root
Safe in WP path?No
Indicator?T in permission bits