Error messages I am getting: > Apr 2 18:21:15 freebsd64 vnstatd[578]: Error: Unable to create database backup "/var/lib/vnstat/.em0". > Apr 2 18:21:15 freebsd64 vnstatd[578]: Error: Unable to write database, continuing with cached data. > Apr 2 18:21:15 freebsd64 vnstatd[578]: Error: Unable to open database "/var/lib/vnstat/tap0" for writing: Permission denied > Apr 2 18:26:16 freebsd64 vnstatd[578]: Error: Unable to create database backup "/var/lib/vnstat/.em0". > Apr 2 18:26:16 freebsd64 vnstatd[578]: Error: Unable to open database "/var/lib/vnstat/tap0" for writing: Permission denied > Apr 2 18:27:45 freebsd64 login: ROOT LOGIN (root) ON ttyv0 > Apr 2 18:29:14 freebsd64 login: ROOT LOGIN (root) ON ttyv1 > Apr 2 18:31:18 freebsd64 vnstatd[578]: Error: Unable to create database backup "/var/lib/vnstat/.em0". > Apr 2 18:31:18 freebsd64 vnstatd[578]: Error: Unable to open database "/var/lib/vnstat/tap0" for writing: Permission denied Actual file permissions: > # ls -l /var/lib/ | grep vnstat > drwxr-xr-x 2 vnstat vnstat 6 Mar 31 21:14 vnstat > # ls -la /var/lib/vnstat > total 19 > drwxr-xr-x 2 vnstat vnstat 6 Mar 31 21:14 . > drwxr-xr-x 9 root wheel 9 Mar 31 21:03 .. > -rw-r--r-- 1 root vnstat 2792 Mar 31 21:08 .em0 > -rw-r----- 1 vnstat vnstat 2792 Apr 2 18:36 .tap0 > -rw-r--r-- 1 root vnstat 2792 Mar 31 21:08 em0 > -rw-r--r-- 1 root vnstat 2792 Mar 31 21:08 tap0 Security info: > # procstat -s 578 > PID COMM EUID RUID SVUID EGID RGID SVGID UMASK FLAGS GROUPS > 578 vnstatd 284 284 284 284 284 284 - - 284
Hello, Did you happen to run the "vnstat --create ..." command as root? That's supposed to be run as the vnstat user, which might be confusing if you've never run vnstat before.
Created attachment 155582 [details] patch Hi Mark, I made vnstat service start smoothly when Interface in config file is valid. Otherwise it fails with the meaningful message. I also added the ability to add vnstat_additional_ifaces in rc.conf. Also all databases are created automatically when requested but missing with the right permissions. I tested it on both base system where vnstat was already running, and on the freshly installed 10.1 system.
Created attachment 155583 [details] patch
Maintainer timeout.
A commit references this bug: Author: feld Date: Fri May 8 13:24:36 UTC 2015 New revision: 385777 URL: https://svnweb.freebsd.org/changeset/ports/385777 Log: Improve configuration and setup of vnstat through the rc script PR: 199133 Changes: head/net/vnstat/Makefile head/net/vnstat/files/pkg-message.in head/net/vnstat/files/vnstat.in
Sorry about the delay, but the changes have finally landed. Thanks for your submission!
Thanks! No problem!