Kolam Ayer MakersLinux Foundations

Command: chmod

Use

chmod u+x script.sh

What It Does

chmod changes permission metadata on files and directories.

Symbolic Modes

chmod u+x script.sh
chmod go-r private-notes.txt
chmod a+r public.html

Executable Scripts

chmod +x ~/scripts/hello.sh
./scripts/hello.sh Makers

chmod +x allows direct execution. It does not fix a broken script, a missing shebang, or bad syntax.

Watch Out

Use ls -l before and after chmod so you can see exactly what changed. Do not use numeric modes such as 777 unless you can explain every bit.

Docs Pointers