Sunday, May 4, 2008

Changing File Ownership

chown {user|.group} file

It is a command to change the owner of the file or directory.

For example

(1) to change the owner of file example to alexander

chown alexander example


(2) to change the group owner of file example to development

chown .development example

(3) to change the owner of file example to alexander and group owner to development in one command

chown alexander.developent example

(4) to change the owner of directory example and all its sub-directories to owner alexander.

chown -R alexander example

Note: The option -R means Recursively

No comments: