Berechtigungen & SicherheitCLI Manual
$chown
Change file owner and group attributes.
BefehlssyntaxPOSIX Standard
chown [OPTIONS] OWNER[:GROUP] FILE...Live im interaktiven Terminal ausprobieren
Client-seitige Simulation ohne Installation mit sofortigem Feedback.
bash — terminal
AST Sandbox (Free)
Überblick & Funktionsweise
`chown` (Change Owner) alters the user ownership and group association of files, directories, and links. System administrators frequently use `chown` when deploying web applications or restoring user permissions after file migrations.
Wichtige Optionen und Flags
| Flag / Option | Description |
|---|---|
| -R | Recursively change ownership of directories and all contents. |
| -v | Verbose output reporting every ownership change executed. |
| -c | Report only when an actual change is made. |
Praktische Anwendungsbeispiele
#1Change owner of a file to user
chown user /var/log/syslog && ls -l /var/log/syslogAssigns user ownership to the system syslog file and checks with ls.
Verwandte Linux-Befehle
$chmodBerechtigungen & Sicherheit
Ändern Sie Dateizugriffsberechtigungen für Besitzer, Gruppe und andere Benutzer.
$sudoBerechtigungen & Sicherheit
Execute a command with superuser (root) security privileges.
$whoamiSystem & Prozesse
Print the effective username associated with the current shell session.