Berechtigungen & SicherheitCLI Manual
$chmod
Ändern Sie Dateizugriffsberechtigungen für Besitzer, Gruppe und andere Benutzer.
BefehlssyntaxPOSIX Standard
chmod [OPTIONS] MODE[,MODE]... FILE...Live im interaktiven Terminal ausprobieren
Client-seitige Simulation ohne Installation mit sofortigem Feedback.
bash — terminal
AST Sandbox (Free)
Überblick & Funktionsweise
chmod steuert Lese-, Schreib- und Ausführungsrechte für Dateien und Ordner unter Linux über Oktalwerte oder symbolische Modi.
Wichtige Optionen und Flags
| Flag / Option | Description |
|---|---|
| 755 | rwxr-xr-x: Owner has full control; group and others can read and execute. |
| 644 | rw-r--r--: Owner can read and write; group and others can read only. |
| 700 | rwx------: Owner has full control; no access for anyone else. |
| -R | Recursively change file permissions on all subdirectories and files. |
| +x | Make a script or binary file executable for all users. |
Praktische Anwendungsbeispiele
#1Make a bash script executable
chmod +x /home/user/projects/demo.sh && ls -l /home/user/projects/demo.shAdds execute permissions to demo.sh and verifies the updated mode bits.
#2Set standard web file permissions (644)
chmod 644 /var/log/syslogGrants read/write to owner and read-only to group and others.