chmod
Linux · Users and permissions · available in the simulator
What it does
Changes file or directory access permissions.
Syntax
chmod [opciones] modo archivo...
Options and parameters
-RChanges files and directories recursively.
chmod -R 755 carpetau/g/o/aTarget: user, group, others, or all.
chmod u+x script.sh+/-/=Adds, removes, or sets exact permissions.
chmod go-w archivo.txtr/w/xRead / write / execute.
-vOutputs a diagnostic for every file processed.
755Octal notation: 4 read, 2 write, 1 execute, for owner, group, and others.
chmod 644 archivo.txt
Usage examples
chmod 755 script.shchmod +x script.shchmod -R u+w carpeta/chmod o-r privado.txtchmod 644 archivo.txtchmod -R u+rwX,go+rX carpeta/chmod -R 755 carpetachmod u+x script.shchmod go-w archivo.txt