Home   |   Guides and Tutorials   |   What's New?   |   Comments   |   About
 

chown: Changing the Owner of a File or Directory

by Tammy Fox
Last Modified: Wednesday, 19-May-2004 11:55:31 EDT

Introduction
    chown is a standard Unix/Linux command that allows you to change the owner of a file/directory. To view the current owner of a file, execute the command ls -l. This will display the files in the current directory in long format. The third column in the table is the owner of the file or directory. For further information on reading permissions, see the Reading Files/Directories Permissions guide.

Using chown
    To change the owner of a file/directory, become root by either logging in directly as the user root or use the su command as a normal user. Type the following command:
chown owner linuxhq (where owner is the new owner and linuxhq is the name of the file or directory you want to change the owner of)
Thus, chown tchin linuxhq would change the owner of the file linuxhq to tchin.

What's Related


All Rights Reserved Linux Headquarters © 2000-2007
Linux is a registered trademark of Linus Torvalds
All logos are registered trademarks of their respective owners
Last modified: Wednesday, May 19, 2004