Online Linux Terminal Logo
OnlineLinuxTerminal
Права доступа и безопасностьCLI Manual

$chown

Change file owner and group attributes.

Синтаксис командыPOSIX Standard
chown [OPTIONS] OWNER[:GROUP] FILE...
Сообщество Linux2.4k Онлайн

Общайтесь с пользователями Linux, учите команды и скачивайте шпаргалки.

Попробуйте в интерактивной песочнице

Клиентская симуляция без установки с мгновенным результатом.

Открыть в полноэкранном терминале ↗
bash — terminal

Обзор и принцип работы

`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.

Основные флаги и параметры команды

Flag / OptionDescription
-RRecursively change ownership of directories and all contents.
-vVerbose output reporting every ownership change executed.
-cReport only when an actual change is made.

Практические примеры использования

#1Change owner of a file to user
chown user /var/log/syslog && ls -l /var/log/syslog

Assigns user ownership to the system syslog file and checks with ls.