Help! Root doesn't own anything anymore!

  • Hello!


    Today I sat down to work on fixing a docker container that was misbehaving. I typically modify the docker-compose files from my PC over a Samba share. All was well and good until I restarted my server. *POOF* my shares disappeared. Normally I would expect for it to be some issue with Windows, but even my mapped drives wouldn't connect.


    Sure enough, systemctl status smbd.service reported back that it was inactive and that it had failed to start. I ran journalctl -xe and started doing some looking around. The more I looked, the more I found the same type of error being reported; they were all along the lines of "root is not the owner of this file" or "wrong file owner." Here are some actual examples:

    When I looked far enough up, I found that samba was failing to start because of similar reasons; not having access to var/lib/samba. Once I saw this, I figured I'd check out the permission of /var/lib. Almost every directory was owned by my user, not root. In fact, when I ls -l /, it's the same thing; almost all directories are owned by my user. Output of ls -l


    I ran chown -R root /var/lib/samba/, restarted the samba service, and now samba is up and running again.


    My questions after all of this:


    1. Should all of these system directories be owned by my user and not root? (something tells me root should own them, no?).
    2. if the permissions should be root, how would you suspect something like this happened? Would it have to be me at some point running chmod on / without realizing? Or could an application have done this?


    I'm more than happy to post any additional logs or info should anyone need it. Thanks for the read, any correspondence is appreciated!

  • Anyone? If perhaps my question is too vague, is there a thread you know of that could help address my issue? It seems that the next best option at this point might just be doing a fresh install, but I'd like to try and figure this out to avoid it down the road.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!