Need advice: big mistake while logged in as root

Yeah… ummm… so… while logged in as root I entered "chown -R root:root /var" instead of my intended "/etc/apache2/var" – thus changing ownership of everything in /var recursively. That broke quite a few things in the process - mysql process, PHP sessions, a mess all over /var/www an so on.

Luckily I have two Linodes with very similar configurations so I was able to view various directory/file ownerships in the one and correct in the other. i.e. looked at everything in /var/run on the non-messed up one and made sure everything in /var/run on the other was the same. Tedious, but it appears I got everything back up and running.

My concern is the two Linodes were similar configuration, but not identical. I'm primarily concerned with an eventual reboot – I don't want the server locked up because root owns some file in /var that it shouldn't and a bootup process can't complete. Any hints at what in /var I should verify ownership permissions on - really critical type stuff? Ubuntu 8.04 with a generic LAMP installation. Thanks!

1 Reply

@stevebroski:

My concern is the two Linodes were similar configuration, but not identical. I'm primarily concerned with an eventual reboot – I don't want the server locked up because root owns some file in /var that it shouldn't and a bootup process can't complete. Any hints at what in /var I should verify ownership permissions on - really critical type stuff? Ubuntu 8.04 with a generic LAMP installation. Thanks!
I'd just do a test reboot and see what happens. It's unlikely that a bad /var ownership/protection is going to prevent a reboot or interfere with core system functions to the point where you won't have access, but even if by some stretch you did that and network access was blocked, there's always lish access to the console.

(And absolute worst case, just define a Finnix recovery boot image that mounts your disk images and you can clean anything else up that way)

– David

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct