Grossd won't start if statefile is enabled
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/
grep '^[^# ]' /etc/default/gross /etc/grossd.conf
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
3. sudo -i -u gross "/usr/sbin/grossd -C"
will silently end but no /var/lib/
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/
(...)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/
-rw-r--r-- 1 gross gross 4 2011-02-05 11:48 /var/run/
/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/
Grossd shutdown with exit code 2: statefile size differs from the calculated size
[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.