cmdxray / dangerous commands / chown-recursive-root

chown -R … /danger

Reassign ownership of the entire tree.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ chown -R nobody:nobody /

  • chownchange file owner and group
  • -Rapply changes recursively
  • nobody:nobodyan argument passed to the command
  • /an argument passed to the command

What it does

Recursively changes the owner and group of every file from the root down.

Why it's dangerous

System services expect specific owners; rewriting ownership across / can lock root out of files, break sudo, and stop the machine from booting cleanly.

Safer alternative

Change ownership only on the exact path that needs it, and back up permission state first (e.g. with `getfacl -R` or a filesystem snapshot).

More dangerous commands

Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.