LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2006, 02:44 AM   #1
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 12.04 64-bit
Posts: 230

Rep: Reputation: 30
locate - Permission denied


I cant seem to use locate. I get this msg.
Code:
username@server [/]# locate mcrypt
warning: locate: could not open database: /var/lib/slocate/slocate.db: Permission denied
warning: You need to run the 'updatedb' command (as root) to create the database.
username@server [/]#
Any idea why ?

Thanks
 
Old 05-10-2006, 02:45 AM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
i assume you did you do what it says? ie run the specified command to create the initial search database

Last edited by nadroj; 05-10-2006 at 02:47 AM.
 
Old 05-10-2006, 02:55 AM   #3
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 12.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
I need root access to run updatedb command ?
 
Old 05-10-2006, 01:52 PM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
yes you do.. since it would attempt modifying files where your normal user account doesnt (or shouldnt!) have access to.

give it a shot.
 
Old 05-11-2006, 01:58 AM   #5
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 12.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
I did updatedb after I did su. Took time but worked. So how does this locate work ? Based on some cached results ? find doesnt seem to need and db - its just like windows dir.
 
Old 05-11-2006, 02:06 AM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 49
locate searches through a database of file names (so it only knows of the things that exist as of the last update of the database); usually people have updatedb run automatically daily or something to update the databases. Searching through a text file is very quick, whereas traversing the entire directory tree (with find) is incredibly slow. I think Windows also has things where you can set a directory to be indexed periodically.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 05:50 AM
Permission Denied Deag^ Linux - Newbie 2 10-20-2004 03:14 PM
Permission Denied Deag^ Linux - Security 1 10-20-2004 12:05 PM
Permission Denied NathanCohen2003 Linux - Software 4 07-10-2004 05:16 PM
Permission denied? jbhoo Linux From Scratch 1 04-27-2002 10:12 PM


All times are GMT -5. The time now is 08:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration