Online Linux Terminal Logo
OnlineLinuxTerminal
Permissions et sécuritéCLI Manual

$chmod

Modifier les permissions d'accès aux fichiers pour le propriétaire, le groupe et les autres.

Syntaxe de la commandePOSIX Standard
chmod [OPTIONS] MODE[,MODE]... FILE...
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

chmod gère les droits de lecture, écriture et exécution sur les fichiers et répertoires en notation octale ou symbolique.

Options et drapeaux courants

Flag / OptionDescription
755rwxr-xr-x: Owner has full control; group and others can read and execute.
644rw-r--r--: Owner can read and write; group and others can read only.
700rwx------: Owner has full control; no access for anyone else.
-RRecursively change file permissions on all subdirectories and files.
+xMake a script or binary file executable for all users.

Exemples pratiques du monde réel

#1Make a bash script executable
chmod +x /home/user/projects/demo.sh && ls -l /home/user/projects/demo.sh

Adds execute permissions to demo.sh and verifies the updated mode bits.

#2Set standard web file permissions (644)
chmod 644 /var/log/syslog

Grants read/write to owner and read-only to group and others.