Skip to main content
Kill -9 Club
Sign in

chmod

FilesPackage: coreutilsHandle with care

Changes permissions. chmod 777 makes the error message go away, and the problem with it — the problem being that anyone can now write that file.

A mistake with this command can destroy data or lock you out

  • chmod -R applies one mode to files and directories alike; -R 644 strips x from the directories and makes them impassable. Use capital X (chmod -R u=rwX,go=rX) or find -type.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

chmod -R
Applies recursively to subdirectories.
chmod --reference
Takes the mode from another file instead of a MODE argument. chmod --reference=target temporary copies the permissions of the file you are about to replace, and stays correct the day somebody changes them.

Lessons that teach it