SA Bugzilla – Bug 7442
UPDATE permission needed on bayes_seen
Last modified: 2017-07-28 20:25:04 UTC
There is an error in the grants in the README.bayes file at: GRANT SELECT, DELETE, INSERT ON TABLE bayes_seen TO <username>; I'm using the MySQL driver (maybe it matters), and UPDATE permission is needed on bayes_seen to avoid: write(6, "\257\0\0\0\3INSERT INTO bayes_seen (id, msgid, flag)\n VALUES ('2','2d74cc15f332ac5a1789ac7d979ef9320ac98d80@sa_generated','s')\n\t ON DUPLICATE KEY UPDATE flag=VALUES(flag)", 179) = 179 read(6, "X\0\0\1\377v\4#42000UPDATE command denied to user 'spamassassin'@'localhost' for table 'bayes_seen'", 16384) = 92 I'm running 3.4.1-6~bpo8+1 from jessie-backports (README.bayes in trunk is the same) and mariadb-server 10.0.30-0+deb8u2.
Thanks Jesse, indeed the MySQL BayesStore backend requires UPDATE privileges on the bayes_seen table. This requirement has been introduced with the fix for bug 5998 (affected SA version 3.4.1). This is specific to the MySQL backend, other SQL storage modules are not affected. Still, for brevity of the docs and since those explicitly are example grants only, I opted to simply add the missing UPDATE privilege for the general case, rather than adding a sub-section to handle this one MySQL storage module specific grant. Committed to trunk and 3.4 branch respectively: Sending sql/README.bayes Transmitting file data . Committed revision 1803334. Sending sql/README.bayes Transmitting file data . Committed revision 1803335. Closing RESOLVED FIXED. Reference: Related to bug 3971, which added the grants section to the documentation in the first place.