3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Report bugs and workarounds
User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 13 Apr 2016 06:36

I'm getting the following warning message from the mailwatch interface when I mark messages as spam:

Code: Select all

SA Learn: WARNING: HOME is not set, using root: /, Learned tokens from 1 message(s) (1 message(s) examined)
This started happening after I upgraded the system from 3.0.0.8.

Anyone have any ideas where I should add the missing HOME variable and where it should be set?

edit: sa-learn is run by the apache user.

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 19 Apr 2016 04:36

Anyone have any thoughts? I've not been able to track this down yet.


User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 27 Apr 2016 08:20

No. I didn't think to try that given that this is an efa installation. I'd think they'd say "the problem is with EFA, now go away."

Can someone help me compare my system with theirs? As root, could you run the following commands and post the results here?
find / -type d -name .spamassassin -exec ls -ld {} \;
my results:

Code: Select all

[root@efa /]# find / -type d -name .spamassassin -exec ls -ld {} \;
drwx------ 3 root root 4096 Aug 15  2015 /root/.spamassassin
drwx------ 3 root root 4096 Mar 30  2015 /.spamassassin

User avatar
shawniverson
Posts: 2900
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by shawniverson » 28 Apr 2016 10:15

Code: Select all

drwx------ 3 root root 4096 Nov 29  2014 /.spamassassin
drwx------ 3 root root 4096 Nov 28  2014 /root/.spamassassin
drwxr-xr-x. 2 postfix postfix 4096 Jan 23  2014 /var/www/.spamassassin
Now, sa-learn executes as apache...this is what I have in /etc/passwd:

Code: Select all

apache:x:48:48:Apache:/var/www:/sbin/nologin
Version eFa 4.0.0 now available!

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 29 Apr 2016 03:09

yes, and when I run the sa-learn command as an apache user id from the command line, I don't get any errors. (I have to change the /etc/passwd file to allow apache to login to test that)

Hmm.. no differences, except I get the error in the web ui and you don't. Weird.

[edit: my files appear the same as yours after all. Not sure how I missed it the first time]

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 10 Jul 2016 18:00

EFA 3.0.0.11 over here, system ahs latest updates installed.

I've just had this exact same problem crop up. I had installed a few new packages today does anything look suspicious?

Code: Select all

rpm -qa --qf '%{INSTALLTIME} %-40{NAME} %{INSTALLTIME:date}\n' | sort -n | cut -d' ' -f2-
.
.
.
dkms                                     Sun 10 Jul 2016 11:39:19 CEST
veeamsnap                                Sun 10 Jul 2016 11:39:22 CEST
fuse-libs                                Sun 10 Jul 2016 11:42:04 CEST
perl-File-BaseDir                        Sun 10 Jul 2016 11:42:59 CEST
veeam                                    Sun 10 Jul 2016 11:43:06 CEST
keyutils                                 Sun 10 Jul 2016 11:45:42 CEST
libgssglue                               Sun 10 Jul 2016 11:45:42 CEST
libtirpc                                 Sun 10 Jul 2016 11:45:42 CEST
nfs-utils-lib                            Sun 10 Jul 2016 11:45:42 CEST
nfs-utils                                Sun 10 Jul 2016 11:45:42 CEST
rpcbind                                  Sun 10 Jul 2016 11:45:42 CEST
I removed perl-File-BaseDir which removed 2 other packages and its all back to working now. Anyone see any problems with this?

Code: Select all

Removing:
 perl-File-BaseDir              noarch         0.03-13.el6           @epel          13 k
Removing for dependencies:
 perl-File-DesktopEntry         noarch         0.08-1.el6            @epel          29 k
 perl-File-MimeInfo             noarch         0.25-1.el6            @epel          91 k

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 11 Jul 2016 06:28

Weird.

Why did you remove perl-File-BaseDir?

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 11 Jul 2016 06:59

Because I remembered that when I installed some of the other packages from those lists I remember to have seen a notification about some probs with perl-File-BaseDir, hence I had installed it. And seeing that it fixed the problem, it was a good guess.

Still, what to do now? Install it again? Does EFA require it? Why would it break things like it did?

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 11 Jul 2016 07:03

Sorry, I have no idea, but what I am going to do is to remove those packages and see if my error goes away.

If the error does go away, I will try to find out why that package was installed in the first place.
Last edited by pdwalker on 11 Jul 2016 07:08, edited 1 time in total.

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 11 Jul 2016 07:07

Cool, please give it a try. It would be nice to see if you can confirm this behaviour.

To explain a bit more, I was installing veeam, which is beta and doesn't resolve dependencies automatically, so it gave me a few things it needed like dkms and nfs-utils and while installing those I vaguely remember seeing some problem with perl-File-BaseDir so I installed it only to later see the EFA problems and after a good guess I removed it and things worked again.

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 12 Jul 2016 08:03

Quick question: Are you using the ole2macro.pm spamassassin module?

I think that may be where the perl-File-BaseDir module came from.

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 12 Jul 2016 08:16

So, I finally got around to testing this. I removed the perl-File-Basedir module with the following command:

Code: Select all

[root@efa spamassassin]# yum remove perl-File-BaseDir
Loaded plugins: fastestmirror, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package perl-File-BaseDir.noarch 0:0.03-13.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                        Arch                                Version                                    Repository                          Size
========================================================================================================================================================================
Removing:
 perl-File-BaseDir                              noarch                              0.03-13.el6                                @epel                               13 k

Transaction Summary
========================================================================================================================================================================
Remove        1 Package(s)

Installed size: 13 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : perl-File-BaseDir-0.03-13.el6.noarch                                                                                                                 1/1
  Verifying  : perl-File-BaseDir-0.03-13.el6.noarch                                                                                                                 1/1

Removed:
  perl-File-BaseDir.noarch 0:0.03-13.el6

Complete!
[root@efa spamassassin]#
So only that module was removed. (mimeinfo is still present), and when I train spamassassin, I no longer get those warning messages in the UI. So the problem is solved for me.

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 12 Jul 2016 09:13

Glad to hear your problem is solved. I'm just wondering why I can't install one without the other:

Code: Select all

Dependencies Resolved

===============================================================================================
 Package                          Arch             Version                Repository      Size
===============================================================================================
Installing:
 perl-File-MimeInfo               noarch           0.25-1.el6             epel            54 k
Installing for dependencies:
 perl-File-BaseDir                noarch           0.03-13.el6            epel            13 k
 perl-File-DesktopEntry           noarch           0.08-1.el6             epel            22 k

Transaction Summary
===============================================================================================
Install       3 Package(s)

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 12 Jul 2016 09:47

Try removing perl-File-BaseDir by itself and see if only that can be removed.

As far as I know, File-MimeInfo doesn't actually need it.

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 12 Jul 2016 09:50

*confused*
I tried that above: yum remove perl-File-BaseDir and it removed the mime package too.

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 12 Jul 2016 09:57

That's funny. It didn't for me.

Can you reinstall only perl-File-MimeInfoi? or does it require per-File-BaseDir?

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 12 Jul 2016 10:23

sorry, I realized I didn't copy the entire code. it automatically selects the dependencies :-(

Code: Select all

yum install perl-File-MimeInfo
Dependencies Resolved
.
.
.
===============================================================================================
 Package                          Arch             Version                Repository      Size
===============================================================================================
Installing:
 perl-File-MimeInfo               noarch           0.25-1.el6             epel            54 k
Installing for dependencies:
 perl-File-BaseDir                noarch           0.03-13.el6            epel            13 k
 perl-File-DesktopEntry           noarch           0.08-1.el6             epel            22 k

Transaction Summary
===============================================================================================
Install       3 Package(s)

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 12 Jul 2016 10:44

Sorry ovizil, I've not got an answer.

I suspect the perl File-BaseDir package was installed when I installed File-MimeInfo, but I don't remember.

I was able to remove File-BaseDir, and my File-MimeInfo is gone.

The File-MimeInfo package is not important for EFA unless you are using the ole2macro.pm addition to help check for macro viruses. You will lose some functionality without File-MimeInfo, but not all.

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 12 Jul 2016 11:17

damn, I do use ole2mcro :-(
maybe someone else will come up with an idea.

could you compare your versions of the packages with the ones I posted earlier?

Code: Select all

 perl-File-MimeInfo               noarch           0.25-1.el6             epel            54 k
 perl-File-BaseDir                noarch           0.03-13.el6            epel            13 k
 perl-File-DesktopEntry           noarch           0.08-1.el6             epel            22 k

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 12 Jul 2016 11:28

identical packages, versions and repositories.

However, the only perl packages I have installed are
- perl-File-MimeInfo
- perl-File-DesktopEntry

but not
- perl-file-BaseDir

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 12 Jul 2016 11:44

Interesting, perl-File-MimeInfo 0.25-1.el6 requires

Code: Select all

perl(File::BaseDir) >
perl(File::DesktopEntry)
=> https://www.rpmfind.net/linux/RPM/epel/ ... oarch.html

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 12 Jul 2016 12:24

It does and that is the version I have installed. Something must be broken in my dependencies database, because I can see the same thing:

Code: Select all

[root@efa spamassassin]# yum deplist perl-File-MimeInfo
Loaded plugins: fastestmirror, security
Finding dependencies:
Loading mirror speeds from cached hostfile
 * EFA: dl.efa-project.org
 * base: ftp.cuhk.edu.hk
 * epel: kodeterbuka.beritagar.id
 * extras: ftp.cuhk.edu.hk
 * rpmforge: mirrors.digipower.vn
 * updates: ftp.cuhk.edu.hk
package: perl-File-MimeInfo.noarch 0.25-1.el6
  dependency: perl(File::DesktopEntry) >= 0.04
   provider: perl-File-DesktopEntry.noarch 0.08-1.el6
   provider: perl-File-DesktopEntry.noarch 0.04-1.el6.rf
  dependency: /usr/bin/perl
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(Fcntl)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(strict)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(Exporter)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(File::BaseDir) >= 0.03
   provider: perl-File-BaseDir.noarch 0.03-13.el6
   provider: webmin.noarch 1.770-1
   provider: perl-File-BaseDir.noarch 0.03-1.el6.rf
  dependency: shared-mime-info
   provider: shared-mime-info.x86_64 0.70-6.el6
  dependency: perl(Carp)
   provider: perl-Devel-Carp.noarch 0.04-1.2.el6.rf
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(File::BaseDir)
   provider: perl-File-BaseDir.noarch 0.03-13.el6
   provider: webmin.noarch 1.770-1
   provider: perl-File-BaseDir.noarch 0.03-1.el6.rf
  dependency: perl(:MODULE_COMPAT_5.10.1)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(File::DesktopEntry)
   provider: perl-File-DesktopEntry.noarch 0.08-1.el6
   provider: perl-File-DesktopEntry.noarch 0.04-1.el6.rf
  dependency: perl(File::Spec)
   provider: perl-PathTools.x86_64 3.30-1.el6.rf
   provider: perl-File-Spec.x86_64 3.30-1.el6.rf
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(bytes)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
Interestingly, I have a second package listed

Code: Select all

package: perl-File-MimeInfo.noarch 0.15-1.el6.rf
  dependency: perl
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(strict)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: /usr/bin/perl
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(Fcntl)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(Exporter)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(File::MimeInfo)
   provider: perl-File-MimeInfo.noarch 0.25-1.el6
   provider: webmin.noarch 1.770-1
   provider: perl-File-MimeInfo.noarch 0.15-1.el6.rf
  dependency: perl(Carp)
   provider: perl-Devel-Carp.noarch 0.04-1.2.el6.rf
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(File::BaseDir)
   provider: perl-File-BaseDir.noarch 0.03-13.el6
   provider: webmin.noarch 1.770-1
   provider: perl-File-BaseDir.noarch 0.03-1.el6.rf
  dependency: perl(File::DesktopEntry)
   provider: perl-File-DesktopEntry.noarch 0.08-1.el6
   provider: perl-File-DesktopEntry.noarch 0.04-1.el6.rf
  dependency: perl(File::Spec)
   provider: perl-PathTools.x86_64 3.30-1.el6.rf
   provider: perl-File-Spec.x86_64 3.30-1.el6.rf
   provider: perl.x86_64 4:5.10.1-141.el6_7.1
  dependency: perl(bytes)
   provider: perl.x86_64 4:5.10.1-141.el6_7.1

which does not have that dependency, and is not installed.

Weird.

Anyway, like I said, according to the notes on ole2macro.pm, having that module is not essential.

User avatar
pdwalker
Posts: 1186
Joined: 18 Mar 2015 09:16

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by pdwalker » 03 Oct 2017 02:45

Strange. The problem has come back.

I don't know when the problem reappeared as I was not paying attention

I removed the module again, and this time it did take the Mimeinfo module out with it.

Code: Select all

[root@efa ~]# yum remove perl-File-BaseDir
Loaded plugins: fastestmirror, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package perl-File-BaseDir.noarch 0:0.03-13.el6 will be erased
--> Processing Dependency: perl(File::BaseDir) >= 0.03 for package: perl-File-DesktopEntry-0.08-1.el6.noarch
--> Processing Dependency: perl(File::BaseDir) for package: perl-File-MimeInfo-0.25-1.el6.noarch
--> Processing Dependency: perl(File::BaseDir) >= 0.03 for package: perl-File-MimeInfo-0.25-1.el6.noarch
--> Running transaction check
---> Package perl-File-DesktopEntry.noarch 0:0.08-1.el6 will be erased
---> Package perl-File-MimeInfo.noarch 0:0.25-1.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                                   Arch                      Version                         Repository                Size
====================================================================================================================================
Removing:
 perl-File-BaseDir                         noarch                    0.03-13.el6                     @epel                     13 k
Removing for dependencies:
 perl-File-DesktopEntry                    noarch                    0.08-1.el6                      @epel                     29 k
 perl-File-MimeInfo                        noarch                    0.25-1.el6                      @epel                     91 k

Transaction Summary
====================================================================================================================================
Remove        3 Package(s)

Installed size: 133 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : perl-File-MimeInfo-0.25-1.el6.noarch                                                                             1/3
  Erasing    : perl-File-DesktopEntry-0.08-1.el6.noarch                                                                         2/3
  Erasing    : perl-File-BaseDir-0.03-13.el6.noarch                                                                             3/3
  Verifying  : perl-File-BaseDir-0.03-13.el6.noarch                                                                             1/3
  Verifying  : perl-File-MimeInfo-0.25-1.el6.noarch                                                                             2/3
  Verifying  : perl-File-DesktopEntry-0.08-1.el6.noarch                                                                         3/3

Removed:
  perl-File-BaseDir.noarch 0:0.03-13.el6

ovizii
Posts: 459
Joined: 11 May 2016 08:08

Re: 3.0.0.9: SA Learn: WARNING: HOME is not set, using root:

Post by ovizii » 03 Oct 2017 14:37

hm, I haven't checked on this in a while and I'm currently on 3.0.2.4 - might upgrade next weekend and report what's what.

Post Reply