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
Click on the "Terminal" icon in the desktop panel to open a terminal window and access the command line.
Type the command "su -" to become the root user.
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.
Type the command "ls -l" to view the ownership of the file.
Type the command "exit" to close the root session.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for