Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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