On 2/16/2023 8:28 PM, Matija Nalis wrote:

On Thu, Feb 16, 2023 at 05:34:37PM -0500, joe a wrote:
Oh, of course.  I installed as root initially, being foolish perhaps, but
did create a specific user "later" and adjusted permissions as needed.  Or,
so I thought.

well, installing as root (especially with restrictive umask) manually
(e.g. "make install" or "cpan" vs. "yum/rpm/dpkg") may often make
problems, even if you later switch to packages (you need to look not
only at final file permissions, but at directories leading up to it
too).

namei -l /path/to/file.pm is often helpful to quickly check ALL
permissions needed to access file (+x on directories is a must)

Permissions are (almost) certainly the issue.  Now having the impressive
locate/mlocate creature at my command, I might actually make progress.

I usually troubleshoot those (if log is insufficient) with:

strace -efile -o /tmp/sa.log spamassassin foobar

then look at /tmp/sa.log to see which open/stat/access returned -1 EPERM
or EACCES error.  Then check all path components for that file using
"namei -l" (or multiple "ls -ld"). Then try to su to that user and
"cat" that file manually.

If not regular DAC (chmod/chown) permissions, it might also be SELINUX
restrictions or more rarely ACL (getfacl(1)).


Well, I am in unfamiliar waters.

picking one error message as typical:

plugin: failed to parse plugin (from @INC): Can't locate Mail/SpamAssassin/Plugin/iXhash2.pm: lib/Mail/SpamAssassin/Plugin/iXhash2.pm: Permission denied at (eval 1746) line 1.

The file locations shown do not exist, as explicitly as shown. What I find using "locate iXhash2.pm" is:

/usr/lib/perl5/vendor_perl/5.26.1/Mail/SpamAssassin/Plugin/iXhash2.pm
which the SA user can access, at least see via ll. The others I've checked are also visible, and directories are x (exccutable).

The sense I am getting is there is a perl file that contains these paths that is referred to as @INC.

I don't have the knowledge at this point to see if, somehow, root sees the files as shown in the error or if the path is somehow altered for the SA user.

Thanks for any guidance.

Reply via email to