Chapter 5: File Attributes and NTFS Permissions
🔒 File Attributes & The Attrib Command
In 🪟 Windows, every file has properties called attributes that dictate how the OS displays, logs, and protects them:
- 🔒 Read-Only (
R): Locks the file, preventing editing, writing, or deletion. - 👻 Hidden (
H): Hides the file from standard file viewer lists and basicdirqueries. - ⚙️ System (
S): Identifies the file as an operating system file that cannot be moved or deleted. - 📦 Archive (
A): Marks the file for backup (is checked by backup utilities to see if it changed since the last copy).
You configure these using the attrib command:
- ➕🔑
attrib +r [filename]: Locks the file as Read-Only (gives it theRtag). - ➕👻
attrib +h [filename]: Hides the file. - ➕⚙️
attrib +s [filename]: Marks it as a System file.
🔒 Access Blocked: If a file is locked as Read-Only, trying to run
del filenamewill trigger a system-levelAccess is deniedblock!