0

I have this situation that never happened to me.

  1. I open terminal (default one) and I run: cd /
  2. I grun the command ls -latr and surprise ... all list of folders are under root owner.
  3. I have multiple Ubuntu PCs in my network ... like 3 and for all of them it's the same thing - in the terminal all folders and subfolders are under root owner and group like in the screenshot.

enter image description here

  1. I'm logged in the terminal not as root, but as a normal user.

What is happening? Is this a display fault? Am I being hacked?

I have managed to change root and user passwords to all PCs and the ownership:group came to normal to all network PCs after these modifications. I've verified /var/log/auth.log and there is an hourly cron activated

Apr  5 04:17:01 nxx-AMD CRON[1030313]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Apr  5 04:17:01 nxx-AMD CRON[1030313]: pam_unix(cron:session): session closed for user root

I don't understand why the shifting ownership from user to root could have happened. Maybe someone has any idea of what is happening because I am freaked out.

karel
  • 122,292
  • 133
  • 301
  • 332
marisxanis
  • 91
  • 1
  • 6

2 Answers2

3

It's completely normal. All system folders are owned by root and should be.

The only things that should not be owned by root is the users home dircetories, and some service directories. But everything in / should be owned by root. If you change permissions or ownership of system directories, your system will probably not boot, and it will compromise security.

The cron message states that cron ran some stuff as root; again perfectly normal.

vidarlo
  • 23,497
1

You changed directories from your home directory (where you own all the files) to the system directory (cd /) and found all the files there owned by the system.

Why is this a surprise? Why do you think your user should own all the files on a system that supports multiple users?

If you are going to explore the files on the system like this, you might find man file-hierarchy helpful.

If you are looking for the files you own, you may find cd ~ (or just cd) helpful to take you home.

user10489
  • 5,533