5

How can I change the file ownership to root on ubuntu 14.04

1 Answers1

5

Use the command:

sudo chown root file.name

chown is tool for changing ownership. As root account is superuser type to change ownership to root you need to run chown command as superuser with sudo.

Melebius
  • 11,431
  • 9
  • 52
  • 78
Kendzi
  • 103
  • 5
  • 1
    Its hard to do it without sodo. Hope added description is enough. – Kendzi May 10 '18 at 12:04
  • What is “sodo”? :-) I fixed that for you. However, there is one more question: What about changing group? With your command, the file would be still writable for the original owner. I know that OP did not specify what their requirement regarding groups is but you should at least mention it in the answer. – Melebius May 11 '18 at 06:21
  • why isn't it root:root? – qwr Sep 08 '22 at 23:23