Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently logged in as root, and I want to switch ownership of files to the xyz user. How can I do that using chown?

share|improve this question

closed as off-topic by Ward, kasperd, faker, Jenny D, masegaloeh Apr 19 '15 at 10:45

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – kasperd, Jenny D, masegaloeh
  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – Ward, faker
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 5 down vote accepted

chown xyz file1 file2 file3 for single files and directories

chown -R xyz dir1 for recursive directories

share|improve this answer
I would politely add to this: man chown. Especially for such simple and basic Unix commands. That said, if the proper usage of chown is unknown to you and you have root access, I would seriously consider reading a more thorough beginner's guide to Unix before you accidentally make a mistake you could regret! – Yanick Girouard Mar 19 '12 at 0:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.