Change Linux File/Folder “Group” and “Owner” (CHOWN)

CHMOD (Change Owner) is a program for setting "owner" and user "group" for a file or folder.

Change the owner of a file to the user “david”

Syntax

chown [user] [file]

Example

chown david logo.png

Change the owner to "david", but the group to “administrator”

Syntax

chown [user].[group] [file]

Example

chown root.administrator logo.png

Change owner and group for all files & folders in the current directory.

Syntax

chown -R [user].[group] [file]

Example

chown -R david.administrator *