Results 1 to 9 of 9

Thread: updatedb

  1. #1

    Default updatedb

    Hi

    In order to use updatedb I need always to change ownership of /var/lib/mlocate
    owner: nobody
    group: root

    The problem is that it seems tor reset on every boot.
    I need to find a way to fix this

    Code:
    linux:~ # updatedb
    updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db'
    If I do:
    Code:
    linux:/var/lib # chown root mlocate/
    linux:/var/lib # updatedb
    linux:/var/lib #
    So then it works.
    But as I mentioned it works only on the current session.



    Any ideas?

    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,864
    Blog Entries
    15

    Default Re: updatedb

    Hi
    Looks like W.I.P with AppArmor profile...

    https://bugzilla.opensuse.org/show_bug.cgi?id=1089594
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,296
    Blog Entries
    2

    Default Re: updatedb

    ?
    Unless something changed <very> recently, I can run "update" with root permissions (did so the other day).

    Did you <just> run "zypper dup" and immediately after run into this problem?

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4

    Default Re: updatedb

    Thanks for the replies.
    I am still not sure of the problem pattern.
    See, 2 days ago I fixed the ownership of '/var/lib/mlocate' as described above and it worked after an instant reboot.
    Main wile i must have 'zypper dup' once or twice. Today I had to remake the ownership. I did a 'zypper dup' an hour or so after the process. And I rebooted tho check the updatedb.
    Well it is still working for now.
    I will monitor it and post if I find something useful.
    Thanks malcomlewis, tsu2.

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,296
    Blog Entries
    2

    Default Re: updatedb

    Just updated a TW and can see this problem now, too.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,864
    Blog Entries
    15

    Default Re: updatedb

    On Wed 22 Aug 2018 04:46:03 PM CDT, tsu2 wrote:

    Just updated a TW and can see this problem now, too.

    TSU


    Hi
    Update that open bug report with your findings....

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.13-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,296
    Blog Entries
    2

    Default Re: updatedb

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Looks like W.I.P with AppArmor profile...

    https://bugzilla.opensuse.org/show_bug.cgi?id=1089594
    Apparently not the same problem.
    As described in the bug, I configured updatedb to run as both "root" and as "nobody" by editing /etc/sysconfig/locate

    No diff.

    So, a different problem.


    I find it a bit curious that the following is the permssions set for mlocate.db.
    When /etc/sysconfig/locate is set to nobody (which is default) things <should> work.
    But, if I change to root, I can't see now the following permissions would permit the file to be over-written.
    Code:
    ls -l /var/lib/mlocate/mlocate.db
    -rw-r--r-- 1 nobody nobody 5497939 Aug 22 08:47 /var/lib/mlocate/mlocate.db
    Interesting that in the original post,
    Instead of configuring updatedb to run as root, you simply "changed owner" to root instead to get it to work
    And then, based on the above permissions I'm not sure how the file can be overwritten.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,296
    Blog Entries
    2

    Default Re: updatedb

    I just tried running your chown method, and I'm not getting the same results...

    First, immediately after chown, I checked the permissions of the directory <and> the database file within the directory and I don't see any permission changes, for some reason the changes aren't taking.
    [Edit - The following command just took forever to run. eventually it completed]
    Then I tried running the "updatedb" command and the command just hangs... The command doesn't return an error right away and is running, but it never completes.

    Eventually the updatedb command completed, and locate is working, but curiously the permissions for over-writing the database haven't changed. Not sure at the moment how this is working.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,296
    Blog Entries
    2

    Default Re: updatedb

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Update that open bug report with your findings....

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.13-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!
    Bug updated, referencing this Forum thread...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

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