How to Change an Owner of a Folder in Centos

Written by kristen waters
  • Share
  • Tweet
  • Share
  • Email

The Linux operating system, including the CentOS distribution, assigns an owner to every file and folder on the system. Normally, the person that creates the folder is the owner. Some scripts and programs require that a certain user own a folder or file but not necessarily the person that created it. You can change the ownership using the "chown" command. A regular user can only change ownership of a folder he owns. The root user can change the ownership of any folder.

Skill level:

Other People Are Reading


  1. 1

    Click on the "Terminal" icon in the desktop panel to open a terminal window and access the command line.

  2. 2

    Type the command "su -" to become the root user.

  3. 3

    Type the command "chown new_user directory/" to change the ownership of the directory. Replace "new_user" with the name of the user who you want to have ownership of the file. Replace "directory" with the name of the directory whose ownership you want to change.

  4. 4

    Type the command "ls -l" to view the ownership of the file.

  5. 5

    Type the command "exit" to close the root session.

Don't Miss


  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.