Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Var lib not root owned

  1. #1
    Join Date
    Dec 2015
    Beans
    49

    Exclamation Var lib not root owned

    Hello,

    I recently installed an app from gnome software center as a standard user.

    but i am unable to run it when i try to launch from software center,

    Tried through terminal and it says /var/lib not root-owned id:id where id mentioned my group number and user number

    Note: I tried in standard user and admin user.

  2. #2
    Join Date
    Jun 2014
    Beans
    111

    Re: Var lib not root owned

    to change ownership
    Code:
    sudo chown root:root /var/lib
    Execute this from /$ prompt. This only changes ownership of the lib directory, to change the sub directories as well
    Code:
    sudo chown -R root:root /var/lib
    Last edited by shag00; April 3rd, 2019 at 04:30 AM.

  3. #3
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    4,941
    Distro
    Xubuntu 19.10 Eoan Ermine

    Re: Var lib not root owned

    Quote Originally Posted by shag00 View Post
    This only changes ownership of the lib directory, to change the sub directories as well
    Code:
    sudo chown -R root:root /var/lib
    Don't do that. Not all contents of /var/lib should be owned by root. A recursive chown can do a lot of damage.

  4. #4
    Join Date
    Dec 2015
    Beans
    49

    Re: Var lib not root owned

    @impavidus, can you tell me which is doable as of now ?

  5. #5
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    4,941
    Distro
    Xubuntu 19.10 Eoan Ermine

    Re: Var lib not root owned

    First, let's see what's wrong. It's not normal that ownership of /var/lib changes spontaneously. It would be nice to know why something went wrong, but we must at least know the extend of the damage. Maybe only one directory is wrong. In that case, there's an easy fix.

    Run these diagnostic commands (they won't change a thing):
    Code:
    ls -al /var
    ls -al /var/lib
    Most files and directories in /var/lib, including /var/lib itself, should be owned by root, but there are some exceptions and if you get them wrong, strange things could happen. The number of exceptions is actually low enough that fixing this should be feasible.

  6. #6
    Join Date
    Dec 2015
    Beans
    49

    Re: Var lib not root owned

    This just list the files with the permission and it has owned by owner

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,739
    Distro
    Kubuntu 19.10 Eoan Ermine

    Re: Var lib not root owned

    Some directories in /var/lib are owned by various pseudo-users. For instance, /var/lib/mysql is owned by the mysql user and group. So you cannot just make the whole tree owned by root until you are sure which directories have non-root owners by design.

    Seeing the directory listing for /var/lib like Impadivus suggested would allow us to help identify these problematic directories.
    Last edited by SeijiSensei; April 5th, 2019 at 05:23 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Dec 2015
    Beans
    49

    Re: Var lib not root owned

    @seijisensei, Yes I changed that permission, so if I change the var\lib folder to be owned by root, the problem solves I guess? or what should I have to do?

  9. #9
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    4,941
    Distro
    Xubuntu 19.10 Eoan Ermine

    Re: Var lib not root owned

    The only thing we know is that your /var/lib is owned by your ordinary user instead of root. We don't know how this happened and whether that's the total extend of your problem. In particular we don't know if anything is wrong with the contents of /var/lib or its parent directory /var. If at some point in the past you used the command
    Code:
    sudo chown $USER:$USER /var/lib
    then the command
    Code:
    sudo chown root:root /var/lib
    will solve the problem. But I don't think that's what happened, because you would have known. Usually when some system directory has a permissions or ownership problem it's just a symptom of a bigger problem. Hence our requests for more information.

  10. #10
    Join Date
    Dec 2015
    Beans
    49

    Re: Var lib not root owned

    @Impavidus, I am using a standard user which I am not allowed to do sudo and even I do it through root , the ls -al commands shows me that /var/lib is owned by my secondary user(from a group of adminstrator) so I can access the files from administrator user.

    Hope you understand what I have done in my file accessing between users.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •