LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-13-2014, 07:34 AM   #1
fawcaz
LQ Newbie
 
Registered: Dec 2009
Posts: 12

Rep: Reputation: 0
cannot get ntop to run


hi

when I try to run ntop I get an error


knoppix@Microknoppix:/media/sda2$ ntop
Fri Jun 13 13:46:07 2014 Initializing gdbm databases
Fri Jun 13 13:46:07 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 13:46:07 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 13:46:07 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 13:46:07 2014 CLEANUP[t3060848640]: ntop caught signal 2 [state=2]
Fri Jun 13 13:46:07 2014 ntop is now quitting...


knoppix@Microknoppix:/media/sda2$ ls -lh /var/lib/ntop
ls: cannot open directory /var/lib/ntop: Permission denied


knoppix@Microknoppix:/media/sda2$ su ls -lh /var/lib/ntop
Usage: su [options] [LOGIN]

Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd

knoppix@Microknoppix:/media/sda2$ sudo ls -lh /var/lib/ntop
total 2.6M
-rw-r----- 1 root root 12K Nov 6 2010 addressQueue.db
-rw-r----- 1 root root 12K Nov 6 2010 dnsCache.db
-rw-r----- 1 root root 232K Jun 12 14:01 fingerprint.db
-rw-r----- 1 root root 13K Jun 12 14:01 hostSerials.db
-rw-r--r-- 1 root root 30 Mar 14 2013 init.cfg
-rw-r----- 1 root root 2.2M Jun 12 13:21 macPrefix.db
-rw-r----- 1 root root 13K Jan 12 2011 ntop_pw.db
-rw-r----- 1 root root 13K Jun 12 13:21 prefsCache.db
-rw-r----- 1 root root 12K Jun 12 14:01 resolverCache.db
drwx------ 5 ntop ntop 2.0K Jan 12 2011 rrd
-rw-r----- 1 root root 301K Jun 13 12:32 topTalkers.db
knoppix@Microknoppix:/media/sda2$
knoppix@Microknoppix:/media/sda2$
knoppix@Microknoppix:/media/sda2$


knoppix@Microknoppix:/media/sda2$ ntop -P /var/lib
Fri Jun 13 14:32:15 2014 Initializing gdbm databases
Fri Jun 13 14:32:15 2014 **ERROR** ....open of /var/lib/prefsCache.db failed: File open error
Fri Jun 13 14:32:15 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 14:32:15 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 14:32:15 2014 CLEANUP[t3060590592]: ntop caught signal 2 [state=2]
Fri Jun 13 14:32:15 2014 ntop is now quitting...


knoppix@Microknoppix:/media/sda2$ sudo ls /var/lib/ntop
addressQueue.db hostSerials.db ntop_pw.db rrd
dnsCache.db init.cfg prefsCache.db topTalkers.db
fingerprint.db macPrefix.db resolverCache.db
knoppix@Microknoppix:/media/sda2$


knoppix@Microknoppix:/media/sda2$ sudo apt-get install ntop
Reading package lists... Done
Building dependency tree
Reading state information... Done
ntop is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 493 not upgraded.


knoppix@Microknoppix:/media/sda2$ ntop
Fri Jun 13 14:33:52 2014 Initializing gdbm databases
Fri Jun 13 14:33:52 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 14:33:52 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 14:33:52 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 14:33:52 2014 CLEANUP[t3060762624]: ntop caught signal 2 [state=2]
Fri Jun 13 14:33:52 2014 ntop is now quitting...
knoppix@Microknoppix:/media/sda2$
 
Old 06-13-2014, 08:48 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,194

Rep: Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068
Quote:
Originally Posted by fawcaz View Post
hi
when I try to run ntop I get an error

knoppix@Microknoppix:/media/sda2$ ntop
Fri Jun 13 13:46:07 2014 Initializing gdbm databases
Fri Jun 13 13:46:07 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 13:46:07 2014 Possible solution: please use '-P <directory>'

knoppix@Microknoppix:/media/sda2$ ls -lh /var/lib/ntop
ls: cannot open directory /var/lib/ntop: Permission denied

knoppix@Microknoppix:/media/sda2$ sudo ls -lh /var/lib/ntop
total 2.6M
-rw-r----- 1 root root 12K Nov 6 2010 addressQueue.db
-rw-r----- 1 root root 12K Nov 6 2010 dnsCache.db
-rw-r----- 1 root root 232K Jun 12 14:01 fingerprint.db
-rw-r----- 1 root root 13K Jun 12 14:01 hostSerials.db
-rw-r--r-- 1 root root 30 Mar 14 2013 init.cfg
-rw-r----- 1 root root 2.2M Jun 12 13:21 macPrefix.db
-rw-r----- 1 root root 13K Jan 12 2011 ntop_pw.db
-rw-r----- 1 root root 13K Jun 12 13:21 prefsCache.db
-rw-r----- 1 root root 12K Jun 12 14:01 resolverCache.db
drwx------ 5 ntop ntop 2.0K Jan 12 2011 rrd
-rw-r----- 1 root root 301K Jun 13 12:32 topTalkers.db
You've been using Linux for at least five years now...the error is very clear, and you actually answered your own question.
  • The ntop program says to use the -P option. Did you????
  • When you tried to do an ls of that directory, it said "permission denied"...wouldn't that tell you that your 'regular' user ID doesn't have permissions to that directory????
  • When you ran it with sudo, you see the files...all owned by root, group root, not readable by anyone else. Wouldn't that tell you that only root/sudo users could read/write to those files????
Either run ntop with the sudo command, or change permissions on that directory/files to allow them to be read by others.
 
Old 06-13-2014, 08:48 AM   #3
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Check your use of sudo/su
If you can't read a directory with your user, and want to use su, you will need to use:
Code:
su -c 'ls'
The -c switch will run that command.

Also, have you tried running ntop with sudo or su?
If i remember rightly, you need to be root to be able to run it.
 
Old 06-13-2014, 11:38 AM   #4
fawcaz
LQ Newbie
 
Registered: Dec 2009
Posts: 12

Original Poster
Rep: Reputation: 0
It's not accurate to say I have been using linux for at least 5 years. I've used it briefly from time to time, over at least 5 years.

Quote:
Originally Posted by TBone
The ntop program says to use the -P option. Did you????
Yes, I included that output in my post. I guess you missed it.

Quote:
Originally Posted by TBone
When you tried to do an ls of that directory, it said "permission denied"...wouldn't that tell you that your 'regular' user ID doesn't have permissions to that directory????
Yes, and that is why if you check my post, I followed `$ ls -lh /var/lib/ntop` with `$ sudo ls -lh /var/lib/ntop`

Quote:
Originally Posted by TBone
When you ran it with sudo, you see the files...all owned by root, group root, not readable by anyone else. Wouldn't that tell you that only root/sudo users could read/write to those files????
Yes I did try `sudo ntop` and `sudo ntop -P /var/lib` It didn't work. I thought i'd included the output of that in my post, but I hadn't. I will next.
 
Old 06-13-2014, 11:44 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,194

Rep: Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068
Quote:
Originally Posted by fawcaz View Post
It's not accurate to say I have been using linux for at least 5 years. I've used it briefly from time to time, over at least 5 years.
Yes, I included that output in my post. I guess you missed it.
Yes, I only looked at the first time you ran the command...
Quote:
Yes, and that is why if you check my post, I followed `$ ls -lh /var/lib/ntop` with `$ sudo ls -lh /var/lib/ntop`
...which is NOT your 'regular user' account. If you run as SUDO, you are running with escalated privileges/root-equivalent. That's why the command WORKED when you ran it with SUDO...which leads us back to "your regular user account doesn't have permissions to read that directory/files"
Quote:
Yes I did try `sudo ntop` and `sudo ntop -P /var/lib` It didn't work. I thought i'd included the output of that in my post, but I hadn't. I will next.
Better, just change the permissions of that directory and files, and run the -P command again. That's it. Again, you're having the issue because your user ID does not have permissions to read/write that directory and those files. Running "sudo chmod -R 755 /var/lib/ntop" would work. Running "sudo chown -R <your user ID> /var/lib/ntop" would also work.
 
Old 06-13-2014, 12:35 PM   #6
fawcaz
LQ Newbie
 
Registered: Dec 2009
Posts: 12

Original Poster
Rep: Reputation: 0
ok, so running ntop as root

(I know sudo is safer but anyhow, same error with sudo)

it gives these errors

Fri Jun 13 18:39:33 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)

and

Fri Jun 13 18:39:38 2014 CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade

Fri Jun 13 18:39:43 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd)

I tried as root, `echo dsfsdsf > /var/lib/ntop/dfds` and running `touch sdfsd` within /var/lib/ntop and it could create those files. So I don't know why running ntop as root and it couldn't create /var/lib/ntop/ntop.pid

I checked https://wiki.archlinux.org/index.php...Fntop.2Frrd.29
regarding the RRD disabled message and it said change the owner of to 'nobody' which I did as you see from my output.

But I still get those errors.


And if you see my first post I included output from `sudo apt-get install ntop` it said it is the latest version.


(testing writing to the directory, I can)
root@Microknoppix:/var/lib/ntop# echo ewr>sdf

root@Microknoppix:/var/lib/ntop# ls sdf
sdf


(making sure the rrd directory is owned by nobody, as that html page says for when getting the RRD error I got)
root@Microknoppix:/var/lib/ntop# chown nobody rrd

root@Microknoppix:/var/lib/ntop# ls -l | grep 'rrd'
drwx------ 5 nobody ntop 160 Jun 13 18:35 rrd


root@Microknoppix:/var/lib/ntop#




root@Microknoppix:/var/lib/ntop# ntop
Fri Jun 13 19:20:22 2014 Initializing gdbm databases
Fri Jun 13 19:20:22 2014 ntop will be started as user nobody
Fri Jun 13 19:20:22 2014 ntop v.4.99.3 (32 bit)
Fri Jun 13 19:20:22 2014 Configured on Mar 2 2013 6:00:33, built on Mar 2 2013 06:01:55.
Fri Jun 13 19:20:22 2014 Copyright 1998-2012 by Luca Deri <deri@ntop.org>
Fri Jun 13 19:20:22 2014 Get the freshest ntop from http://www.ntop.org/
Fri Jun 13 19:20:22 2014 NOTE: ntop is running from 'ntop'
Fri Jun 13 19:20:22 2014 NOTE: (but see warning on man page for the --instance parameter)
Fri Jun 13 19:20:22 2014 NOTE: ntop libraries are in '/usr/lib/ntop'
Fri Jun 13 19:20:22 2014 Initializing ntop
.............................
Fri Jun 13 19:20:28 2014 VENDOR: ntop continues ok
.................
Fri Jun 13 19:20:28 2014 **ERROR** GeoIP: unable to load file GeoLiteCity.dat
Fri Jun 13 19:20:28 2014 **ERROR** GeoIP: unable to load ASN file GeoIPASNum.dat
.....................................
Fri Jun 13 19:20:28 2014 Calling plugin start functions (if any)
Fri Jun 13 19:20:28 2014 RRD: Welcome to the RRD plugin
Fri Jun 13 19:20:28 2014 RRD: Mask for new directories is 0700
Fri Jun 13 19:20:28 2014 RRD: Mask for new files is 0066
Fri Jun 13 19:20:28 2014 THREADMGMT[t3060635648]: ntop RUNSTATE: INITNONROOT(3)
....................
Fri Jun 13 19:20:28 2014 Now running as requested user 'nobody' (65534:65534)
Fri Jun 13 19:20:28 2014 Note: Reporting device initally set to 0 [eth0] (merged)
Fri Jun 13 19:20:28 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)
.......................
Fri Jun 13 19:20:33 2014 CHKVER: Checking current ntop version at version.ntop.org/version.xml
Fri Jun 13 19:20:34 2014 CHKVER: Version file is from 'version.ntop.org'
Fri Jun 13 19:20:34 2014 CHKVER: as of date is '2012-10-16T11:00:47'
Fri Jun 13 19:20:34 2014 CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade
Fri Jun 13 19:20:38 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd)
^CFri Jun 13 19:28:58 2014 CLEANUP[t3060635648]: ntop caught signal 2 [state=4]
Fri Jun 13 19:28:58 2014 Active sessions=0/Active hosts=1
.............
Fri Jun 13 19:28:59 2014 RRD: Shutting down, locking mutex (may block for a little while)
.............
Fri Jun 13 19:28:59 2014 RRD: Thanks for using the rrdPlugin
Fri Jun 13 19:28:59 2014 RRD: Done
......
Fri Jun 13 19:29:00 2014 ntop is now quitting...
^Croot@Microknoppix:/var/lib/ntop#
root@Microknoppix:/var/lib/ntop#
 
Old 06-13-2014, 01:02 PM   #7
fawcaz
LQ Newbie
 
Registered: Dec 2009
Posts: 12

Original Poster
Rep: Reputation: 0
@TBone, I wrote even in my first post that I did "$ sudo ls -lh /var/lib/ntop" it's in the output a line after the ls without sudo.

You replied

"When you tried to do an ls of that directory, it said "permission denied"...wouldn't that tell you that your 'regular' user ID doesn't have permissions to that directory????"

I wrote "Yes, and that is why if you check my post, I followed `$ ls -lh /var/lib/ntop` with `$ sudo ls -lh /var/lib/ntop` "

What i'm trying to show you there, is that I know the regular user doesn't have permission and hence I did that sudo command. But your reply suggests you don't understand that.

You replied saying "your regular user account doesn't have permissions to read that directory/files"

I don't understand why you don't accept that I did Sudo ls because the regular ls didn't have permission to read it. You even quoted where I did sudo ls.

You keep repeating that the regular account doesn't have permission to read the directory, but I told you that besides doing sudo with that ls command, I did run 'sudo ntop' too

So I don't understand why you don't understand what i'm trying to communicate.

I am aware that the regular account doesn't have permission.

Giving it permission doesn't help.. and it didn't run with sudo and still doesn't.

I have tried your suggestion below, but it doesn't work.

knoppix@Microknoppix:~$ sudo chown -R knoppix /var/lib/ntop
knoppix@Microknoppix:~$ sudo chmod 755 /var/lib/ntop
knoppix@Microknoppix:~$ ls -ld /var/lib/ntop
drwxr-xr-x 4 knoppix ntop 408 Jun 13 19:52 /var/lib/ntop
knoppix@Microknoppix:~$


So that's your suggestion. It doesn't work

knoppix@Microknoppix:~$ ntop
Fri Jun 13 19:55:26 2014 Initializing gdbm databases
Fri Jun 13 19:55:26 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 19:55:26 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 19:55:26 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 19:55:26 2014 CLEANUP[t3060647936]: ntop caught signal 2 [state=2]
Fri Jun 13 19:55:26 2014 ntop is now quitting...
knoppix@Microknoppix:~$



knoppix@Microknoppix:~$ ntop -P /var/lib
Fri Jun 13 19:54:28 2014 Initializing gdbm databases
Fri Jun 13 19:54:28 2014 **ERROR** ....open of /var/lib/prefsCache.db failed: File open error
Fri Jun 13 19:54:28 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 19:54:28 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 19:54:28 2014 CLEANUP[t3060287488]: ntop caught signal 2 [state=2]
Fri Jun 13 19:54:28 2014 ntop is now quitting...
knoppix@Microknoppix:~$ ntop -P /var/lib/ntop
Fri Jun 13 19:54:31 2014 Initializing gdbm databases
Fri Jun 13 19:54:31 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 19:54:31 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 19:54:31 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 19:54:31 2014 CLEANUP[t3060127744]: ntop caught signal 2 [state=2]
Fri Jun 13 19:54:31 2014 ntop is now quitting...
knoppix@Microknoppix:~$


And if I try with sudo

knoppix@Microknoppix:~$ sudo ntop
Fri Jun 13 19:55:50 2014 Initializing gdbm databases
Fri Jun 13 19:55:50 2014 ntop will be started as user nobody
Fri Jun 13 19:55:50 2014 ntop v.4.99.3 (32 bit)
Fri Jun 13 19:55:50 2014 Configured on Mar 2 2013 6:00:33, built on Mar 2 2013 06:01:55.
Fri Jun 13 19:55:50 2014 Copyright 1998-2012 by Luca Deri <deri@ntop.org>
Fri Jun 13 19:55:50 2014 Get the freshest ntop from http://www.ntop.org/
Fri Jun 13 19:55:50 2014 NOTE: ntop is running from 'ntop'
Fri Jun 13 19:55:50 2014 NOTE: (but see warning on man page for the --instance parameter)
Fri Jun 13 19:55:50 2014 NOTE: ntop libraries are in '/usr/lib/ntop'
Fri Jun 13 19:55:50 2014 Initializing ntop
.......
Fri Jun 13 19:55:53 2014 VENDOR: ntop continues ok
Fri Jun 13 19:55:53 2014 VENDOR: Checking for MAC address table file
Fri Jun 13 19:55:53 2014 VENDOR: File '/usr/share/ntop/oui.txt' does not need to be reloaded
Fri Jun 13 19:55:53 2014 VENDOR: ntop continues ok

.....
Fri Jun 13 19:55:53 2014 **ERROR** GeoIP: unable to load file GeoLiteCity.dat
Fri Jun 13 19:55:53 2014 **ERROR** GeoIP: unable to load ASN file GeoIPASNum.dat
Fri Jun 13 19:55:53 2014 NOTE: Interface merge enabled by default

......
Fri Jun 13 19:55:53 2014 RRD: Welcome to Round-Robin Database. (C) 2002-12 by Luca Deri.
Fri Jun 13 19:55:53 2014 SFLOW: Welcome to sFlow.(C) 2002-12 by Luca Deri
Fri Jun 13 19:55:53 2014 Calling plugin start functions (if any)
Fri Jun 13 19:55:53 2014 RRD: Welcome to the RRD plugin
Fri Jun 13 19:55:53 2014 RRD: Mask for new directories is 0700
Fri Jun 13 19:55:53 2014 RRD: Mask for new files is 0066
Fri Jun 13 19:55:53 2014 THREADMGMT: RRD: Started thread (t2984246080) for data collection
.........
Fri Jun 13 19:55:53 2014 WEB: ntop's web server is now processing requests
Fri Jun 13 19:55:53 2014 THREADMGMT[t2984246080]: RRD: Data collection thread starting [p5596]
Fri Jun 13 19:55:53 2014 THREADMGMT[t3060733952]: ntop RUNSTATE: INITNONROOT(3)
Fri Jun 13 19:55:53 2014 Now running as requested user 'nobody' (65534:65534)
Fri Jun 13 19:55:53 2014 Note: Reporting device initally set to 0 [eth0] (merged)
Fri Jun 13 19:55:53 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)
......
Fri Jun 13 19:55:58 2014 CHKVER: Checking current ntop version at version.ntop.org/version.xml
Fri Jun 13 19:55:58 2014 CHKVER: Version file is from 'version.ntop.org'
Fri Jun 13 19:55:58 2014 CHKVER: as of date is '2012-10-16T11:00:47'
Fri Jun 13 19:55:58 2014 CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade
Fri Jun 13 19:56:03 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd)
^C

Fri Jun 13 19:56:07 2014 CLEANUP[t3060733952]: ntop caught signal 2 [state=4]
.........
Fri Jun 13 19:56:08 2014 ===================================
Fri Jun 13 19:56:08 2014 ntop is shutdown...
Fri Jun 13 19:56:08 2014 ===================================
knoppix@Microknoppix:~$

Last edited by fawcaz; 06-13-2014 at 01:03 PM.
 
Old 06-13-2014, 01:10 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,194

Rep: Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068
Quote:
Originally Posted by fawcaz View Post
ok, so running ntop as root (I know sudo is safer but anyhow, same error with sudo)
..which isn't what was suggested previously. Again, you need to change the permissions of that directory/those files to be owned by a non-root user, and read/writeable by non-root users.
Quote:
it gives these errors

Fri Jun 13 18:39:33 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)
...which brings us back to "change the permissions on that directory"...again....
Quote:
Fri Jun 13 18:39:38 2014 CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade
Fri Jun 13 18:39:43 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd)
...again, permissions/ownership on the directory. Still aren't changed, so you're having problems.
Quote:
I tried as root, `echo dsfsdsf > /var/lib/ntop/dfds` and running `touch sdfsd` within /var/lib/ntop and it could create those files. So I don't know why running ntop as root and it couldn't create /var/lib/ntop/ntop.pid
Because if you looked at what you posted, it clearly says that ntop was started as user nobody...and again, the user nobody IS NOT ROOT, which is who owns the directories in question...UNLESS YOU MAKE THEM READ/WRITEABLE TO REGULAR USERS, THIS WILL HAPPEN. Can't be more clear than that...I even gave you two commands (the chmod and chown's previously stated), which will fix this problem.
Quote:
Quote:
I checked regarding the RRD disabled message and it said change the owner of to 'nobody' which I did as you see from my output. But I still get those errors.

And if you see my first post I included output from `sudo apt-get install ntop` it said it is the latest version.
(testing writing to the directory, I can)
root@Microknoppix:/var/lib/ntop# echo ewr>sdf
root@Microknoppix:/var/lib/ntop# ls sdf
sdf

(making sure the rrd directory is owned by nobody, as that html page says for when getting the RRD error I got)
root@Microknoppix:/var/lib/ntop# chown nobody rrd
root@Microknoppix:/var/lib/ntop# ls -l | grep 'rrd'
drwx------ 5 nobody ntop 160 Jun 13 18:35 rrd

root@Microknoppix:/var/lib/ntop# ntop
Fri Jun 13 19:20:22 2014 Initializing gdbm databases
Fri Jun 13 19:20:22 2014 ntop will be started as user nobody
...see the above comments about permissions; this tells you why you're getting the errors. And the rrd directory may be owned by nobody, but AGAIN, if the parent directory isn't, then THE USER WILL NOT BE ABLE TO READ DOWN INTO THAT TREE. Again, change the ownership/permissions.
Quote:
Fri Jun 13 19:20:28 2014 **ERROR** GeoIP: unable to load file GeoLiteCity.dat
Fri Jun 13 19:20:28 2014 **ERROR** GeoIP: unable to load ASN file GeoIPASNum.dat
Did you load these files??
Quote:
Fri Jun 13 19:20:28 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)
Fri Jun 13 19:20:38 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd)
...still the same permissions issue...fix it.[/QUOTE]
Again, don't know how much more clear I can state it. Your problem is caused by the permissions on the /var/lib/ntop directory being wrong. Until you fix the permissions, ownership, or both, there's nothing else anyone can do for you. There is NOTHING anyone can do to help you, if you don't do what's suggested to you. If you don't at least TRY to follow the advice given, there's little point in posting.

You were given two commands previously: use one or both of them.
 
Old 06-13-2014, 02:02 PM   #9
fawcaz
LQ Newbie
 
Registered: Dec 2009
Posts: 12

Original Poster
Rep: Reputation: 0
If you look in my output, I did


knoppix@Microknoppix:~$ sudo chown -R knoppix /var/lib/ntop
knoppix@Microknoppix:~$ sudo chmod 755 /var/lib/ntop
knoppix@Microknoppix:~$ ls -ld /var/lib/ntop
drwxr-xr-x 4 knoppix ntop 408 Jun 13 19:52 /var/lib/ntop
knoppix@Microknoppix:~$

And in case that's not enough i've done 777 now. On Everything in /var/lib/ntop, every file every directory.

I still get.

Fri Jun 13 20:54:40 2014 Now running as requested user 'nobody' (65534:65534)
Fri Jun 13 20:54:40 2014 Note: Reporting device initally set to 0 [eth0] (merged)
Fri Jun 13 20:54:40 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)

I've now tried

root@Microknoppix:/var/lib# chown -R nobody ntop
root@Microknoppix:/var/lib#

But when I do sudo ntop OR just ntop without sudo, I still get

Fri Jun 13 20:56:56 2014 Now running as requested user 'nobody' (65534:65534)
Fri Jun 13 20:56:56 2014 Note: Reporting device initally set to 0 [eth0] (merged)
Fri Jun 13 20:56:56 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)

If that is not what you mean me to do then could you tell me exactly what command you think I should be running? (I have already tried two of your suggestions as mentioned a number of times and as can be seen in my output)

So please tell me what you mean me to do - that being - (A command that I haven't already run) So do check my output before you suggest something, because it may be something i've already done)

And if I try ntop from my knoppix account
Or ntop -P /var/lib OR ntop -P /var/lib/ntop

Fri Jun 13 21:04:48 2014 Initializing gdbm databases
Fri Jun 13 21:04:48 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 21:04:48 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 21:04:48 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 21:04:48 2014 CLEANUP[t3060631552]: ntop caught signal 2 [state=2]
Fri Jun 13 21:04:48 2014 ntop is now quitting...
knoppix@Microknoppix:~$

Last edited by fawcaz; 06-13-2014 at 02:06 PM.
 
Old 06-13-2014, 02:11 PM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,194

Rep: Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068Reputation: 8068
Quote:
Originally Posted by fawcaz View Post
If you look in my output, I did

knoppix@Microknoppix:~$ sudo chown -R knoppix /var/lib/ntop
knoppix@Microknoppix:~$ sudo chmod 755 /var/lib/ntop
knoppix@Microknoppix:~$ ls -ld /var/lib/ntop
drwxr-xr-x 4 knoppix ntop 408 Jun 13 19:52 /var/lib/ntop
knoppix@Microknoppix:~$
Where? I haven't seen you do this before now, and your previous post was edited after I replied. And is there even a user knoppix? Why are you not setting the user (that is the chown command), to be YOUR user ID, as suggested, or to nobody?? And doing the chmod without the -R only changes the top-level directory; nothing underneath. Try again with the -R, as suggested.
Quote:
And in case that's not enough i've done 777 now. On Everything in /var/lib/ntop, every file every directory.
I still get.
Fri Jun 13 20:54:40 2014 Now running as requested user 'nobody' (65534:65534)
Fri Jun 13 20:54:40 2014 Note: Reporting device initally set to 0 [eth0] (merged)
Fri Jun 13 20:54:40 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)

I've now tried

root@Microknoppix:/var/lib# chown -R nobody ntop
root@Microknoppix:/var/lib#

But when I do sudo ntop OR just ntop without sudo, I still get

Fri Jun 13 20:56:56 2014 Now running as requested user 'nobody' (65534:65534)
Fri Jun 13 20:56:56 2014 Note: Reporting device initally set to 0 [eth0] (merged)
Fri Jun 13 20:56:56 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)

If that is not what you mean me to do then could you tell me exactly what command you think I should be running? (I have already tried two of your suggestions as mentioned a number of times and as can be seen in my output)
No, I haven't seen you try them a number of times..just here in this last post.
Quote:
So please tell me what you mean me to do - that being - (A command that I haven't already run) So do check my output before you suggest something, because it may be something i've already done)

And if I try ntop from my knoppix account

knoppix@Microknoppix:~$ ntop
Fri Jun 13 21:04:48 2014 Initializing gdbm databases
Fri Jun 13 21:04:48 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 21:04:48 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 21:04:48 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 21:04:48 2014 CLEANUP[t3060631552]: ntop caught signal 2 [state=2]
Fri Jun 13 21:04:48 2014 ntop is now quitting...
knoppix@Microknoppix:~$
Again, change the ownership of that directory, and everything under it, to be YOUR USER ID: the one you're trying to start ntop from. The
Code:
**WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid)
..message is a warning; did you check to see if ntop was running after that? After setting the directory to be owned by YOUR USER ID (as said several times now), try typing in "touch /var/lib/ntop/ntop.pid", and see if it then works.
 
Old 06-13-2014, 02:51 PM   #11
fawcaz
LQ Newbie
 
Registered: Dec 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TBone
Where? I haven't seen you do this before now, and your previous post was edited after I replied
I wrote Post #7 at 9:02AM and edited it at 9:03AM (though I think it was there before my edit anyway). (If I wrote anything in that edit it was not extra commands, but repeating a line saying that your suggestion didn't work, in the hope that you'd notice it - I wrote twice in that post that your suggested commands didn't work)

And you replied at 9:07AM saying I hadn't done the commands. Then when I post at 10:02AM to say I did those commands and they're there, you say it's the first time you've seen it.

You ask if there is a user called knoppix. Yes there is. Look at my output

Even the first line of output in my first post had a prompt that read-

knoppix@Microknoppix:/media/sda2$

You quote
"knoppix@Microknoppix:~$ ntop"

That part before the @ is my username. If I do echo $USER it says "knoppix".

As you can see, from output below, it's all owned by knoppix and 777 and i'm running ntop from user knoppix

A thing I haven't done (I don't know if you think I should), is make all of /var/lib owned by knoppix but that seems like overkill and I believe /var/lib/ntop is the parent so i've only operated on that.

Notice, that the following output shows that knoppix owns /var/lib/ntop and all its contents and all the contents is 777.

And notice that I did ntop AND ntop -P /var/lib/ntop

that is all in the output below

knoppix@Microknoppix:/var/lib$ ls -l | grep ntop
drwxrwxrwx 4 knoppix ntop 408 Jun 13 20:59 ntop
-rw-r----- 1 root root 12546 Jun 13 18:31 ntop_pw.db

knoppix@Microknoppix:/var/lib$ ls -l ntop
ls: cannot open directory ntop: Permission denied
(PLEASE CONTINUE READING TO THE NEXT LINE WHERE I DO THE SAME LINE WITH SUDO)

knoppix@Microknoppix:/var/lib$ sudo ls -l ntop
total 2630
-rwxrwxrwx 1 knoppix root 12288 Nov 6 2010 addressQueue.db
-rwxrwxrwx 1 knoppix root 12288 Nov 6 2010 dnsCache.db
-rwxrwxrwx 1 knoppix root 237568 Jun 13 20:59 fingerprint.db
-rwxrwxrwx 1 knoppix root 12396 Jun 13 20:59 hostSerials.db
-rwxrwxrwx 1 knoppix root 30 Mar 14 2013 init.cfg
-rwxrwxrwx 1 knoppix root 2208040 Jun 12 13:21 macPrefix.db
-rwxrwxrwx 1 knoppix root 12546 Jan 12 2011 ntop_pw.db
-rwxrwxrwx 1 knoppix root 13216 Jun 13 20:59 prefsCache.db
-rwxrwxrwx 1 knoppix root 12288 Jun 13 20:59 resolverCache.db
drwxrwxrwx 5 knoppix ntop 160 Jun 13 18:35 rrd
-rwxrwxrwx 1 knoppix root 4 Jun 13 19:18 sdf
-rwxrwxrwx 1 knoppix root 307376 Jun 13 19:28 topTalkers.db
knoppix@Microknoppix:/var/lib$


knoppix@Microknoppix:~$ ntop
Fri Jun 13 21:43:04 2014 Initializing gdbm databases
Fri Jun 13 21:43:04 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 21:43:04 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 21:43:04 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 21:43:04 2014 CLEANUP[t3060557824]: ntop caught signal 2 [state=2]
Fri Jun 13 21:43:04 2014 ntop is now quitting...


knoppix@Microknoppix:~$ ntop -P /var/lib/ntop
Fri Jun 13 21:43:09 2014 Initializing gdbm databases
Fri Jun 13 21:43:09 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Fri Jun 13 21:43:09 2014 Possible solution: please use '-P <directory>'
Fri Jun 13 21:43:09 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Fri Jun 13 21:43:09 2014 CLEANUP[t3060996096]: ntop caught signal 2 [state=2]
Fri Jun 13 21:43:09 2014 ntop is now quitting...
knoppix@Microknoppix:~$

Last edited by fawcaz; 06-13-2014 at 05:41 PM.
 
  


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
why my ntop can't start using service ntop start command cmx08 Linux - Software 5 10-21-2008 10:52 PM
NTOP, need help creatorrr Linux - Networking 2 01-09-2008 03:55 PM
Ntop Help yuiy88 Linux - Networking 0 06-15-2007 01:25 AM
About NTOP shipon_97 Linux - Security 4 02-08-2006 09:58 AM
looking to run ntop once daily reading from pcap file doublez Linux - Software 1 08-25-2005 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:56 AM.

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
Open Source Consulting | Domain Registration