---
title: "HOST-FS-017 World-Writable Directories Without the Sticky Bit"
canonical: https://openvapt.com/checks/HOST-FS-017.html
html: https://openvapt.com/checks/HOST-FS-017.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-FS-017 World-Writable Directories Without the Sticky Bit

Looks for shared writable directories outside /tmp and /etc that let any user delete or replace other users' files.

- Domain: Server
- Severity: Medium
- Control category: Access Control
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N`
- CIS Controls v8: 3.3
- NIST CSF 2.0: PR.AA-05, PR.DS-01
- CWE: CWE-732, CWE-377
- NIST SP 800-53 Rev. 5: AC-3, CM-6
- Benchmark topic: Sticky bit on world-writable directories (CIS Controls v8 3.3) (topic only, no benchmark text)

## Why It Matters

In a world-writable directory without the sticky bit, any user can remove or swap a file placed there by another user or by a service, which turns upload folders and spool directories into file-replacement attacks.

## How It Detects

Lists directories up to three levels below /var, /home, /opt, /srv and /usr/local (metadata only, at most 5000 per tree, symlinks never treated as directories) and reports those writable by others without the sticky bit. HOST-FS-002 covers /tmp and /var/tmp; HOST-FS-003 covers /etc.

## How to Fix

chmod +t <dir>  for directories that must stay shared, or  chmod o-w <dir>  for those that should not be writable by everyone.

## How to Verify

```
find /var /home /opt /srv /usr/local -xdev -type d -perm -0002 ! -perm -1000  should print nothing.
```

## Learn the Theory

- [P1 Linux Server Hardening](https://openvapt.com/academy/p1.md)
- [P17 Kernel, Filesystem and Boot Hardening](https://openvapt.com/academy/p17.md)

## References

- [chmod(1), Linux man-pages (restricted deletion flag)](https://man7.org/linux/man-pages/man1/chmod.1.html)
- [NIST SP 800-123, Guide to General Server Security](https://csrc.nist.gov/pubs/sp/800/123/final)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/files_mounts.go

Run it: `openvapt scan --only HOST-FS-017`. Read it offline: `openvapt explain HOST-FS-017`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-FS-017.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
