The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Slocate Error

Discussion in 'Database Discussions' started by Mysteerie, Oct 21, 2004.

  1. Mysteerie

    Mysteerie Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    I'm getting the following error

    Code:
    /etc/cron.daily/slocate.cron:
    
    fatal error: updatedb: create_db(): rename: No such file or directory
    I tried reinstall it through whm (not a force reinstall), but that didn't work). I get this email everyday for a while now, I tried also searching the forums, but they are having a problem with slocate groups and not thta it can't find the directory.

    How would I correct this problem, and what does slocate actually do?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    On an RH Linux server, the default location of the slocate database (locate is a database of every file on your server which you can do a search for with locate filename) is in:

    /var/lib/slocate/

    I would guess that somehow that directory has been deleted or has the wrong ownership/permissions.

    You can recreate and set the correct ownership and permissions with:

    mkdir /var/lib/slocate
    chown -R root:slocate /var/lib/slocate
    chmod 750 /var/lib/slocate


    Then rerun slocate.cron by typing:

    /etc/cron.daily/slocate.cron

    It will probably run for anywhere between 5 and 20 minutes.
     
  3. Mysteerie

    Mysteerie Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    Thank you for your response. I followed your steps (even though the file was there, I checked before following your steps). I also ran it, and didn't get any emails. Though this morning I got them again. If I were to delete the folder and the file all together, and follow your steps, would that harm my system?

    Thank you for your time.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Deleting and recreating the directory wouldn't do any more harm that's already there ;)
     
  5. Mysteerie

    Mysteerie Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    I gave up on fixing this for a while, but it's still there. The wierd thing is when I try and running the command through root as a cron and not, I get no error. It's only at 4am when I get this email saying it.

    I'm just curious, as if you have any more suggestions on what can be causing it and in order to fix it, also I'm wondering how much of a real threat it is to the system?
     
  6. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    I have the same problem.
    Could it be due to my running the script securetmp?

    Vin
     
  7. eglwolf

    eglwolf Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    I have noticed that each night when slocate runs and it is running updatedb my server just about stalls the whole time this runs, and last night the server got "stuck" and and I had to reboot.

    What could be cuasing this?
     
  8. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    Change the file permissions to 755 for /usr/bin/slocate

    My guess is secure tmp alters it and sets the S flag so you would see -rwxr-sr-x
    This I believe is the problem

    Vin
     
  9. chican0

    chican0 Well-Known Member

    Joined:
    Mar 26, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Los Angeles
    Has this been confirmed to be the resolution yet?
     
Loading...

Share This Page