Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am the owner of the file (userA), and I can't change it to userB.

when I run chown -R userB ./

It tells me : failed to change ownership of
what I am missing?

share|improve this question
up vote 4 down vote accepted

You're not allowed to do that, it's just how permissions work. Imagine the implications of being able to chown anything arbitrarily on a system with user disk quotas enforced. It would be trivial to push somebody over their quota.

share|improve this answer
How to resolve it? – Pentium10 May 10 '11 at 6:49
If you are only a user on the box, ask your admin and if you have root rights, use sudo chown. – Sven May 10 '11 at 6:56
It may be worth talking about why you cannot do it. – Red Tux May 10 '11 at 7:17
The other reason for not being able to do this is easily seen: consider your little binary that adds an extra line to /etc/passwd; you own it, since you compiled it, then you chmod 4755 ./binary ; chown root:root ./binary ; ./binary. Hey presto, no system security. The ability to give a file away by chown is inconsistent with the sudo bit, unless you want no system security at all. – MadHatter May 10 '11 at 7:33
@MadHatter: Great addition, I didn't even think about that. – Tim Bielawa May 15 '11 at 3:27

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.