Skip to content

chown COMMAND:

July 24, 2010

chown COMMAND:
chown command is used to change the owner / user of the file or directory. This is an admin command, root user only can change the owner of a file or directory.

The Syntax is
chown [options] newowner filename/directoryname


-R Change the permission on files that are in the subdirectories of the directory that you are currently in.
-c Change the permission for each file.
-f Prevents chown from displaying error messages when it is unable to change the ownership of a file.


  1. chown hiox test.txt

    The owner of the ‘test.txt’ file is root, Change to new user hiox.

  2. chown -R hiox test

    The owner of the ‘test’ directory is root, With -R option the files and subdirectories user also gets changed.

  3. chown -c hiox calc.txt

    Here change the owner for the specific ‘calc.txt’ file only


From → Unix

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: