Skip to main content

1750

Sticky Bit + 750

1750 combines:

  • **Sticky Bit (1) only owners/root can delete inside directory
  • Owner: rwx
  • Group: r-x
  • Others: --

Effect summary:

Owner full access, group read/execute, others no access, sticky protection against file-deletion inside a directory.

This mode is **rare but potentially useful for internal shared directories where multiple trusted users read/execute but only creators delete their files.

Never appropriate inside WordPress public paths.

Objective

Understand 1750 and its secure application in controlled environments, not in WordPress runtime directories.

Concept Breakdown

Octal structure

DigitMeaning
1Sticky bit
7Owner rwx
5Group r-x
0Others ---

Behavior

ContextResult
DirectoryOnly owners delete own files
File (no effect)Sticky matters only for directories

Syntax Formula

Apply 1750

chmod 1750 <directory>

Remove sticky bit

chmod -t <directory>

Verify

ls -ld <directory>

Permission Indicator

drwxr-x--T

Or if directory has exec for others (not here) you would see t here it's T.

Key: **T because others have no execute.

Practical Example & Output

Internal shared program dir (read/exec only)

groupadd devshare
mkdir /srv/devshare
chgrp devshare /srv/devshare
chmod 1750 /srv/devshare
ls -ld /srv/devshare

Expected:

drwxr-x--T ... /srv/devshare

WordPress-Relevant Usage

ScenarioValidNotes
Internal shared tool/asset folder (non-web)✅ If controlled
Security staging folder✅ With ACL
wp-content/uploads❌ Breaks functionality, insecure
wp-content/cache❌ Improper for WP
Public HTTP directory❌ Never

WordPress upload/cache directories must not use sticky in production.

Use proper isolation and file ownership instead.

WP Server Scenarios

CaseRecommendation
Controlled internal ops directoryValid
Temporary scratch folder for adminsValid
Any WordPress public dirNot valid
Shared SFTP upload poolUse 1770 or ACL, not 1750

Security Considerations

Advantages

BenefitReason
Restricts deletionPrevents file sabotage
Blocks outsidersNo access for others

Risks

RiskWhy
Misapplied in WP dirsUpload breaks + attack vector
Sticky misunderstoodDoesn’t prevent code execution
Manual group handlingAdmin overhead

Audit

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

Remove sticky if misused:

chmod -t <dir>

Best Practices

PracticeReason
Use only for internal admin pathsNo runtime risk
Prefer /srv or /opt/toolsNot /home/public_html
Use ACLs for precisionModern access control
Never apply to WP runtime dirsBreaks PHP/uploads

WordPress Audit

Scan WP tree:

find /home -perm -1000

If sticky bit appears inside WordPress path fix:

chmod -t <dir>
chmod 750 <dir>

Then restore normal WP perms.

Go-Live Checklist

Checklist
Sticky only in internal dirs
No sticky in /home/*/public_html
ACL or sudo policy applied
Audit schedule weekly

Troubleshooting Matrix

IssueCauseFix
Team can't delete filesSticky setReview perms or remove
WP upload failsSticky misusedReset perms
Access denied for others0 for othersIntended behavior

Quick Lab

groupadd ops
mkdir /srv/ops-temp
chgrp ops /srv/ops-temp
chmod 1750 /srv/ops-temp
touch /srv/ops-temp/test

List:

ls -ld /srv/ops-temp

Expect:

drwxr-x--T ... /srv/ops-temp

Cheat Sheet

CommandPurpose
chmod 1750Sticky + 750
chmod -tRemove sticky
find / -perm -1000Audit sticky dirs
ls -ldCheck T bit

Mini-Quiz

QuestionAnswer
Purpose of sticky bit?Owner-only delete
Safe for WP public dirs?No
Indicator for 1750?T
Better access control alternative?ACLs