That was also my first guess, but it seems not the be the case here alll dirs 
are 755 and the file 644:

rd@netcup:~$ locate SpamCop.pm
/usr/share/perl5/Mail/SpamAssassin/Plugin/SpamCop.pm
rd@netcup:~$ ls -l /usr/share/perl5/Mail/SpamAssassin/Plugin/SpamCop.pm
-rw-r--r-- 1 root root 8578 Feb  7  2014 /usr/share/perl5/Mail/SpamAssassin/
Plugin/SpamCop.pm
rd@netcup:~$ ls -ld /usr/share/perl5/Mail/SpamAssassin/Plugin
drwxr-xr-x 2 root root 4096 Feb  3  2015 /usr/share/perl5/Mail/SpamAssassin/
Plugin
rd@netcup:~$ ls -ld /usr/share/perl5/Mail/SpamAssassin
drwxr-xr-x 10 root root 4096 Feb  3  2015 /usr/share/perl5/Mail/SpamAssassin
rd@netcup:~$ ls -ld /usr/share/perl5/Mail
drwxr-xr-x 6 root root 4096 Feb  3  2015 /usr/share/perl5/Mail
rd@netcup:~$ ls -ld /usr/share/perl5
drwxr-xr-x 60 root root 4096 Jan  5 09:29 /usr/share/perl5
rd@netcup:~$ ls -ld /usr/share
drwxr-xr-x 173 root root 4096 May 21  2017 /usr/share
rd@netcup:~$ ls -ld /usr
drwxr-xr-x 11 root root 4096 Feb  1  2016 /usr
rd@netcup:~$ ls -ld /
drwxr-xr-x 23 root root 4096 Jan 10 22:25 /
rd@netcup:~$

Rainer

Am Mittwoch, 18. April 2018, 14:09:47 CEST schrieb Christian Grunfeld:
> "Can“t locate" and "permission denied" seems to be a directory permission
> issue
> 
> 2018-04-18 14:03 GMT-03:00 Rainer Dorsch <m...@bokomoko.de>:
> > Hello,
> > 
> > I have a strange problem when reporting spam using spamassassin -rD
> > 
> > I monitor an imap directory using inotifywait:
> > 
> > inotifywait --monitor --quiet --event moved_to,create --format '%f'
> > /home/rd/
> > Maildir/.SPAM-learned/cur/ | /home/rd/bin/reportspam-line.sh 2>&1
> > 
> > and then report spam using
> > 
> > rd@netcup:~$ cat bin/reportspam-line.sh
> > !#/bin/bash
> > 
> > while read line
> > do
> > 
> >     echo "$line"
> >     spamassassin -rD < /home/rd/Maildir/.SPAM-learned/cur/$line
> > 
> > done < "${1:-/dev/stdin}"
> > rd@netcup:~$
> > 
> > Then spamassassin report errors like
> > 
> > Apr 18 18:44:40.902 [5112] warn: plugin: failed to parse plugin (from
> > @INC):
> > Can't locate Mail/SpamAssassin/Plugin/SpamCop.pm: lib/Mail/SpamAssassin/
> > Plugin/SpamCop.pm: Permission denied at (eval 31) line 1.
> > Apr 18 18:44:40.902 [5112] dbg: plugin: loading
> > Mail::SpamAssassin::Plugin::AutoLearnThreshold from @INC
> > Apr 18 18:44:40.902 [5112] warn: plugin: failed to parse plugin (from
> > @INC):
> > Can't locate Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm: lib/Mail/
> > SpamAssassin/Plugin/AutoLearnThreshold.pm: Permission denied at (eval 32)
> > line
> > 1.
> > [...]
> > 0 message(s) examined.
> > 
> > When I run directly from cmd line, these errors do not show up:
> > 
> > rd@netcup:~$ spamassassin -rD < /home/rd/Maildir/.SPAM-learned/cur/
> > 1524003783.H176971P29357.netcup.bokomoko.de\:2\,S
> > [...]
> > Apr 18 18:49:52.980 [5164] dbg: config: using "/home/rd/.spamassassin/
> > user_prefs" for user prefs file
> > Apr 18 18:49:52.980 [5164] dbg: config: read file /home/rd/.spamassassin/
> > user_prefs
> > Apr 18 18:49:52.981 [5164] dbg: plugin: loading
> > Mail::SpamAssassin::Plugin::URIDNSBL from @INC
> > Apr 18 18:49:52.986 [5164] dbg: plugin: loading
> > Mail::SpamAssassin::Plugin::Hashcash from @INC
> > Apr 18 18:49:52.995 [5164] dbg: plugin: loading
> > Mail::SpamAssassin::Plugin::SPF from @INC
> > [...]
> > Apr 18 18:50:11.222 [5164] info: reporter: spam reported to SpamCop
> > 1 message(s) examined.
> > Apr 18 18:50:11.301 [5164] dbg: plugin:
> > Mail::SpamAssassin::Plugin::MIMEHeader=HASH(0x372cf68) implements
> > 'finish_tests', priority 0
> > Apr 18 18:50:11.301 [5164] dbg: plugin:
> > Mail::SpamAssassin::Plugin::Check=HASH(0x372d220) implements
> > 'finish_tests',
> > priority 0
> > 
> > It almost seems that a prefix is missing when running through inotifywait.
> > 
> > Any hint is welcome :-)
> > 
> > Many thanks
> > Rainer
> > 
> > --
> > Rainer Dorsch
> > http://bokomoko.de/


-- 
Rainer Dorsch
http://bokomoko.de/

Reply via email to