Permisos y seguridadCLI Manual
$chown
Change file owner and group attributes.
Sintaxis del comandoPOSIX Standard
chown [OPTIONS] OWNER[:GROUP] FILE...Prueba en vivo en la terminal interactiva
Simulación del lado del cliente sin instalación y con respuesta inmediata.
bash — terminal
AST Sandbox (Free)
Descripción general y funcionamiento
`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.
Opciones y banderas comunes
| 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. |
Ejemplos prácticos del mundo real
#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.