>_ linuxcommand.dev
Startseite chown
Permissions

chown

Change file owner and group.

Syntax
$chown [USER][:GROUP] FILE
Examples
Examples
$chown www-data:www-data /var/www -R
Examples
$chown john file.txt
Warnings
Caution: Wrong permissions can affect security or functionality
Tip: Use -R only when really needed
Shortcuts
chmod -R 755 /var/www (recursive for web directory)
chown -R www-data:www-data /var/www
Typical use cases
Web permissions
chmod 755 /var/www
Change owner
chown user:group file
Note Usually requires root privileges.
Export