Kopano spamd error - PermissionError: [Errno 1] Operation not permitted
-
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
-
hi here is mine
-
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. -
hi i indeed allredeay gave the folders 777 permissions however same issue.
-
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?
-
since you antispam system is not running on the same user, this setting is kind of useless for you (only required for the local programm to have read/write access to it). I would just set sa_group to kopano.
-
Yes, you probley need to add rspamd to the kopano group.
Can you run :systemctl show | grep -i protect
it might be a case of ProtectSystem= ( sandboxing within systemd)
-
if i do this is inotify-learnspam still doing its part?
-
hi yust tried and still have this error
-
@ckruijntjens said in Kopano spamd error - PermissionError: [Errno 1] Operation not permitted:
if i do this is inotify-learnspam still doing its part?
I have not completely followed the other topic, but there was something about the antispam system running on a different system and the need to pipe/copy the mail to the other system. so if the message needs to cross systems local ownership is not really relevant.
@ckruijntjens said in Kopano spamd error - PermissionError: [Errno 1] Operation not permitted:
hi yust tried and still have this error
Above i posted a command to test the chown.
-
hi i have rspamd and kopano on the same system. now if i check the logs when i change the sa user to kopano it only gives me a warning in journalctl.
connection refused?
-
itis working now.