Grossd won't start if statefile is enabled

Bug #713779 reported by Mark Alan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gross (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: gross

# while using Ubuntu 10.10 and Gross 1.0.2-2:

1. Using a working grossd
2. add line: statefile = /var/lib/gross/grossd.state to /etc/grossd.conf
grep '^[^# ]' /etc/default/gross /etc/grossd.conf
  /etc/default/gross:DAEMON_OPTS=""
  /etc/grossd.conf:protocol = sjsms
  /etc/grossd.conf:protocol = postfix
  /etc/grossd.conf:statefile = /var/lib/gross/grossd.state
  /etc/grossd.conf:check = dnsbl
  /etc/grossd.conf:dnsbl = bl.spamcop.net;2
  /etc/grossd.conf:dnsbl = combined.njabl.org
  /etc/grossd.conf:dnsbl = cbl.abuseat.org
  /etc/grossd.conf:dnsbl = dnsbl.sorbs.net

3. sudo -i -u gross "/usr/sbin/grossd -C"
  will silently end but no /var/lib/gross/grossd.state will be created

4. sudo /etc/init.d/gross restart
 * Restarting gross policy server gross [ OK ]
tail /var/log/syslog
  (...)grossd version 1.0.2 starting...
  (...)creating pidfile /var/run/gross/gross.pid
  (...)Grossd shutdown with exit code 2: stat(): statefile opening failed No such file or directory

5. sudo /etc/init.d/gross status
 * gross is not running

6. sudo ls -la /var/run/gross/gross.pid /var/lib/gross
-rw-r--r-- 1 gross gross 4 2011-02-05 11:48 /var/run/gross/gross.pid
/var/lib/gross:
total 8
drwx------ 2 gross gross 4096 2011-02-05 11:35 .
drwxr-xr-x 71 root root 4096 2011-02-05 10:26 ..

7. (cd /var/lib/gross/;sudo touch grossd.state; sudo chown gross.gross grossd.state) ; sudo /etc/init.d/gross restart ; sudo tail /var/log/syslog
  Grossd shutdown with exit code 2: statefile size differs from the calculated size

Revision history for this message
Mark Alan (malan) wrote :

[SOLVED] please close ticket.

The Ubuntu Gross .deb package postinst uses 'install -d -o gross -g gross -m 0700 /var/lib/gross' to create the /var/lib/gross directory in which the statefile should be stored.

In Ubuntu (at least with with apparmor on and using strict permissions enforcement), one must assure that sudoers & apparmor are configured to permit 'sudo -u gross /usr/sbin/grossd -C' to use the /var/lib/gross directory.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.