Kopano spamd error - PermissionError: [Errno 1] Operation not permitted
-
Diving into this caused quite some head scratching. The issue is caused by failing over to the bundled daemon module in python-kopano, which was still required in the python2 world, but not anymore in python3. The issue should go away when you install the python3-module manually. We will add this as an official dependency soon.
-
I have tried it now also in the newest Version (kopano-spamd_8.7.80.424.3b35b58f3-0+49.1_amd64.deb) but also there is the problem not fixed:
2019-01-05 14:00:58,351 - spamd - INFO - Learning message as SPAM, entryid: 00000000A497753E7B1B4CE3894BB06ABB7C1F4501000000050000003AF8292887AE435FA977C1660CBA61C500000000 2019-01-05 14:00:58,377 - spamd - ERROR - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/log.py", line 103, in log_exc try: yield File "/usr/lib/python3/dist-packages/kopano_spamd/__init__.py", line 83, in update self.learn(item, searchkey, True) File "/usr/lib/python3/dist-packages/kopano_spamd/__init__.py", line 106, in learn os.chown(emlfilename, uid, gid) PermissionError: [Errno 1] Operation not permitted: '/var/lib/kopano/spamd/spam/B469CB25904A45A79A66D3F5B6882661.eml'
-
-
@fbartels: I’ve installed python3-daemon via apt-get but I get the error already.
-
@ashceryth yes, but i doesn’t work.
-
@fbartels have you changed more then only installing the python-deamon?
-
try both
apt install python-daemon python3-daemon
and/or
apt install python-daemonize python3-daemonize
And what are the rights on : /var/lib/kopano/spamd/spam/
i havent looked at my system, but the rights are probley 755
you can try
chmod -R 1770 /var/lib/kopano/spamdadduser spamassassin kopano
adduser amavis kopanorestart spamassassin and amavis
-
I’ve now installed
python-daemon, python3-daemon,python-daemonize, python3-daemonize
but i got always the same error message.
I always changed the permission on /var/lib/kopano/spamd and add the user to the group kopano.
-
@thctlo i’ve already done and now again without any progress depending on the failure.
-
i have the same problem on centos 7.
2019-01-09 21:08:27,656 - spamd - ERROR - Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/kopano/log.py”, line 103, in log_exc
try: yield
File “/usr/lib/python2.7/site-packages/kopano_spamd/init.py”, line 83, in update
self.learn(item, searchkey, True)
File “/usr/lib/python2.7/site-packages/kopano_spamd/init.py”, line 106, in learn
os.chown(emlfilename, uid, gid)
OSError: [Errno 1] Operation not permitted: ‘/var/lib/kopano/spamd/spam/EEEE4E84C38D4D4DAC3EC2BCA3CD477A.eml’ -
which version of python3-daemon are you using? so we can try to reproduce the problem here…
-
-
@mark-dufour here is the needed output from a Debian 9 Server:
$ pip3.5 list Package Version ----------------- ------- python-daemon 2.1.1
-
-
Check if the rights are correct for the user that is running the spam daemon.
@ckruijntjensThe systemd config of inotify-spamleard looks good, except the user/group.
it might be ok, but check the full path rights off : /var/lib/kopano/spamd/spam
In this folder check if folder spamd is acceccable (RWX) buy kopano user and group and same for the spam folder
of test with a 777 on the folders and check what happens. -
-
hmm, you still have the "operation not permitted message.
Show me also the next folder content : /var/lib/kopano/spamd/spam
-
On a Debian system you have to be member of a group to chown to that group. The permissions on the file do not matter for that.
-
that folder is also 777. i use a centos 7 system
-
do i need to add rspamd group to kopano?