On Mon, 10 Feb 2025 at 18:13, Damian <ama...@arcsin.de> wrote: > > I cannot reproduce your problem with `cpan` alone, but one can get such > "Permission denied" errors, when the path towards an @INC entry cannot be > traversed at some point. > > root@edbfe5cd3d75:~# mkdir -p /usr/local/lib/site_perl/Foo && chmod o-rwx > /usr/local/lib/site_perl > root@edbfe5cd3d75:~# echo 1 > /usr/local/lib/site_perl/Foo/Bar.pm > root@edbfe5cd3d75:~# perl -MFoo::Bar -e1 > root@edbfe5cd3d75:~# su - amavis -c 'perl -MFoo::Bar -e1' > Can't locate Foo/Bar.pm: /usr/local/lib/site_perl/Foo/Bar.pm: Permission > denied. > BEGIN failed--compilation aborted. > > So it does not need to be related to the Amavis namespace.
Hi Damien, I did indeed have a problem with the one of the paths in the @INC not being traversable, but that prevented amavis from starting at all. I fixed that before getting to the current issue. Using your commands as a clue, I did - and got - this: root@mail:~$ perl -MAmavis::SpamControl::SpamAssassin -e1 Amavis::Util: can't obtain a tainted string at /usr/local/share/perl/5.36.0/Amavis/Util.pm line 81. root@mail:~$ su - amavis -c 'perl -MAmavis::SpamControl::SpamAssassin -e1' Amavis::Util: can't obtain a tainted string at /usr/local/share/perl/5.36.0/Amavis/Util.pm line 81. Searching for that error brought me to an old thread - https://www.mail-archive.com/amavis-users%40amavis.org/msg06424.html - where you linked to: https://gitlab.com/amavis/amavis/-/issues/85 However, that did not give me a lot to go on. The path environment looks sane to me. I trust the solution is not to be adding paths from the @INC value there, right? root@mail:~$ grep -inr "$ENV{PATH}" /etc/amavis/ /etc/amavis/conf.d/01-debian:24:$ENV{PATH} = $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; For interest, the @INC looks like, and these are all traversable. root@mail:~$ perl -le 'print for @INC' | sort /etc/perl /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/lib/x86_64-linux-gnu/perl-base /usr/local/lib/site_perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/share/perl5 /usr/share/perl/5.36 Thanks. Simon