Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-27 Thread Voytek

quote who=DaZZa
 On Sun, 26 Dec 2004, Voytek wrote:

 quote who=DaZZa
  On Sun, 26 Dec 2004, Voytek wrote:

 I suggest either
 1) The install process sucks
 or
 2) You've done something wrong during the installation.


DaZZa

it seems I might have done something wrong again

I've noticed there was a newer/more recent amavisd-new rpm at the same
site, so, I've upgraded to the more recent version (thinking 'this will be
easy...':

rpm -Uvh amavisd-new-2.2.0-3.0.rh7.rf.i386.rpm

I've set amavisd.conf like before

# ls -l /etc/amavisd.conf
-rw-r--r--1 root root23283 Dec 27 18:30 /etc/amavisd.conf

now, I get:
# service amavisd start
Starting Mail Virus Scanner (amavisd): su: user amavis does not exist
   [FAILED]
it seems the previous build required (and created) user 'vscan, and, this
one requires (but does not create) user 'amavis'

what is the suggested fix:
edit script to use user 'vscan' ? or
create user 'amavis' similar to vscan ?


-- 
Voytek
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-27 Thread DaZZa
On Mon, 27 Dec 2004, Voytek wrote:

 it seems I might have done something wrong again

 I've noticed there was a newer/more recent amavisd-new rpm at the same
 site, so, I've upgraded to the more recent version (thinking 'this will be
 easy...':

 rpm -Uvh amavisd-new-2.2.0-3.0.rh7.rf.i386.rpm

 I've set amavisd.conf like before

 # ls -l /etc/amavisd.conf
 -rw-r--r--1 root root23283 Dec 27 18:30 /etc/amavisd.conf

 now, I get:
 # service amavisd start
 Starting Mail Virus Scanner (amavisd): su: user amavis does not exist
[FAILED]
 it seems the previous build required (and created) user 'vscan, and, this
 one requires (but does not create) user 'amavis'

 what is the suggested fix:
 edit script to use user 'vscan' ? or
 create user 'amavis' similar to vscan ?

Whatever makes you happier.

If you don't want to screw with your user table, edit the config file.

If you don't feel comfortable editing the config file, then add the new
user.

Your choice. Personally, I'd have made the amavis user the first time
around and had it use that, but that's just me.

DaZZa

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-27 Thread Voytek
quote who=DaZZa
 On Mon, 27 Dec 2004, Voytek wrote:

 Your choice. Personally, I'd have made the amavis user the first time
 around and had it use that, but that's just me.

Dazza,

yes, late yesterday, I opted for the later, and, it started up OK, and,
after some more fiddling, I got clamd to run under same user.
now I just need to figure out how it all fits... and, hook up to MTA

thanks for your help

-- 
Voytek
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-26 Thread Voytek

quote who=DaZZa
 On Sun, 26 Dec 2004, Voytek wrote:

 quote who=DaZZa
  On Sun, 26 Dec 2004, Voytek wrote:


 Edit the configuration file, search for $daemon_user, then change it to
 read either vscan or clamav and see what happens.


Dazza,

thanks, after both chown and chmod as you suggested, it's starting OK:

==
# service amavisd start
Starting Mail Virus Scanner (amavisd): [  OK  ]
# service amavisd status
amavisd (pid 11101 11100 11088) is running...
amavis-milter is stopped


/var/log/messages
Dec 26 22:44:59 koala su(pam_unix)[11042]: session opened for user vscan
by root
(uid=0)
Dec 26 22:45:08 koala su(pam_unix)[11042]: session closed for user vscan
Dec 26 22:45:08 koala amavisd: amavisd startup succeeded
===



-- 
Voytek
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread Voytek
I'm trying to config/setup clamav and amavisd-new

I've installed amavisd-new-2.2.0-3.0.rh7.rf.i386.rpm and 
clamav-0.80-1.0.rh7.dag.i386.rpm

when I try to start amavisd, I get:

# service amavisd status
amavisd is stopped
amavis-milter is stopped
# service amavisd start
Starting Mail Virus Scanner (amavisd): Config file /etc/amavisd.conf is
owned by
 EUID 101, should be owned by root at /usr/sbin/amavisd line 892.
   [FAILED]
# ls -l /etc/amavisd.conf
-rw-r-1 vscanvscan1813 Dec 26 11:25 /etc/amavisd.conf

I presume the install process set the owner to 'vscan', so, I'm not sure
how I should be attacking this ?



-- 
Voytek
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread DaZZa
On Sun, 26 Dec 2004, Voytek wrote:

 I'm trying to config/setup clamav and amavisd-new

 I've installed amavisd-new-2.2.0-3.0.rh7.rf.i386.rpm and
 clamav-0.80-1.0.rh7.dag.i386.rpm

 when I try to start amavisd, I get:

 # service amavisd status
 amavisd is stopped
 amavis-milter is stopped
 # service amavisd start
 Starting Mail Virus Scanner (amavisd): Config file /etc/amavisd.conf is
 owned by
  EUID 101, should be owned by root at /usr/sbin/amavisd line 892.
[FAILED]
 # ls -l /etc/amavisd.conf
 -rw-r-1 vscanvscan1813 Dec 26 11:25 /etc/amavisd.conf

 I presume the install process set the owner to 'vscan', so, I'm not sure
 how I should be attacking this ?

chown root.root /etc/amavisd.conf

It tells you what is wrong - the file is owned by EUID 101, and should be
owned by root.

DaZZa

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread Voytek

quote who=DaZZa
 On Sun, 26 Dec 2004, Voytek wrote:


 chown root.root /etc/amavisd.conf

 It tells you what is wrong - the file is owned by EUID 101, and should be
 owned by root.

if I do that I get:

# chown root:root  /etc/amavisd.conf
# service amavisd start
Starting Mail Virus Scanner (amavisd): Config file /etc/amavisd.conf not
readable at /usr/sbin/amavisd line 892. [FAILED]

/var/log/messages
Dec 26 14:59:22 koala su(pam_unix)[22036]: session opened for user vscan
by root(uid=0)
Dec 26 14:59:24 koala su: Config file /etc/amavisd.conf not readable at
/usr/sbin/amavisd line 892.
Dec 26 14:59:24 koala su(pam_unix)[22036]: session closed for user vscan
Dec 26 14:59:24 koala amavisd: amavisd startup failed


/usr/sbin/amavisd line 892
...
  my($errn) = stat($config_file) ? 0 : 0+$!;
  if($errn == ENOENT) { $msg = does not exist }
  elsif ($errn)  { $msg = inaccessible: $! }
  elsif (!-f _)  { $msg = not a regular file }
  elsif (!-r _)  { $msg = not readable }
  elsif ($  -o _) { $msg = is owned by EUID $, should be owned by
root }
  elsif ($  -w _) { $msg = is writable by EUID $, EGID $) }
  if (defined $msg) { die Config file $config_file $msg }
  do $config_file;
  if ($@ ne '') { die Error in config file $config_file: $@ }


-- 
Voytek
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread DaZZa
On Sun, 26 Dec 2004, Voytek wrote:

 quote who=DaZZa
  On Sun, 26 Dec 2004, Voytek wrote:


  chown root.root /etc/amavisd.conf
 
  It tells you what is wrong - the file is owned by EUID 101, and should be
  owned by root.

 if I do that I get:

 # chown root:root  /etc/amavisd.conf
 # service amavisd start
 Starting Mail Virus Scanner (amavisd): Config file /etc/amavisd.conf not
 readable at /usr/sbin/amavisd line 892. [FAILED]

chmod 644 /etc/amavisd.conf

Make it readable by anyone, writable by root only.

DaZZa

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread Voytek

quote who=DaZZa
 On Sun, 26 Dec 2004, Voytek wrote:

 quote who=DaZZa
  On Sun, 26 Dec 2004, Voytek wrote:

 chmod 644 /etc/amavisd.conf

 Make it readable by anyone, writable by root only.

that starts, then dies:

]# chmod 644 /etc/amavisd.conf
# service amavisd start
Starting Mail Virus Scanner (amavisd): [  OK  ]
# service amavisd status
amavisd dead but subsys locked
amavis-milter is stopped
]# ls -l  /etc/amavisd.conf
-rw-r--r--1 root root 1893 Dec 26 14:47 /etc/amavisd.conf
#


Dec 26 15:23:51 koala sshd(pam_unix)[23621]: session opened for user root
by (uid=0)
Dec 26 15:24:48 koala su(pam_unix)[23762]: session opened for user vscan
by root (uid=0)
Dec 26 15:24:50 koala su: WARN: running under user '101' (UID=101), the
config file specifies $daemon_user='amavisd' (UID=?)
Dec 26 15:24:52 koala su(pam_unix)[23762]: session closed for user vscan
Dec 26 15:24:52 koala amavisd: amavisd startup succeeded


-- 
Voytek
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread DaZZa
On Sun, 26 Dec 2004, Voytek wrote:

 quote who=DaZZa
  On Sun, 26 Dec 2004, Voytek wrote:
 
  quote who=DaZZa
   On Sun, 26 Dec 2004, Voytek wrote:

  chmod 644 /etc/amavisd.conf
 
  Make it readable by anyone, writable by root only.

 that starts, then dies:

 ]# chmod 644 /etc/amavisd.conf
 # service amavisd start
 Starting Mail Virus Scanner (amavisd): [  OK  ]
 # service amavisd status
 amavisd dead but subsys locked
 amavis-milter is stopped
 ]# ls -l  /etc/amavisd.conf
 -rw-r--r--1 root root 1893 Dec 26 14:47 /etc/amavisd.conf
 #


 Dec 26 15:23:51 koala sshd(pam_unix)[23621]: session opened for user root
 by (uid=0)
 Dec 26 15:24:48 koala su(pam_unix)[23762]: session opened for user vscan
 by root (uid=0)
 Dec 26 15:24:50 koala su: WARN: running under user '101' (UID=101), the
 config file specifies $daemon_user='amavisd' (UID=?)
 Dec 26 15:24:52 koala su(pam_unix)[23762]: session closed for user vscan
 Dec 26 15:24:52 koala amavisd: amavisd startup succeeded

So what is UID 101?

The configuration file specifies that the program run as a user named
amavisd - yet when the daemon starts, it tries to run as a user with UID
101.

Do you have a user named amavisd? If not, you can either create one, or
modify the configuration file to specify the user the daemon runs as.

From the looks of the error message, you don't have a user called
amavisd - you should probably create one to make it work properly. I'd
suggest you set it to disallow interactive login by setting its default
shell to /bin/false, and set its home directory to wherever amavisd is
installed.

DaZZa

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread Voytek

quote who=DaZZa
 On Sun, 26 Dec 2004, Voytek wrote:

 So what is UID 101?

vscan

(which was the original owner of the /etc/amavisd.conf)

 The configuration file specifies that the program run as a user named
 amavisd - yet when the daemon starts, it tries to run as a user with UID
 101.

 Do you have a user named amavisd? If not, you can either create one, or
 modify the configuration file to specify the user the daemon runs as.

 From the looks of the error message, you don't have a user called
 amavisd - you should probably create one to make it work properly. I'd
 suggest you set it to disallow interactive login by setting its default
 shell to /bin/false, and set its home directory to wherever amavisd is
 installed.

the install procedures created two new users:

clamav  100 clamav  Clam Anti Virus Checker /var/clamav 
/sbin/nologin

vscan   101 vscan   Virus scan user /var/tmp/bin/sh

the conf file was originally owned by vscan, should I try to run it as
vscan ?

-- 
Voytek
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] amavis-new setup: vscan owns conf file

2004-12-25 Thread DaZZa
On Sun, 26 Dec 2004, Voytek wrote:

 quote who=DaZZa
  On Sun, 26 Dec 2004, Voytek wrote:

  So what is UID 101?

 vscan

 (which was the original owner of the /etc/amavisd.conf)

I suggest either

1) The install process sucks

or

2) You've done something wrong during the installation.

  The configuration file specifies that the program run as a user named
  amavisd - yet when the daemon starts, it tries to run as a user with UID
  101.
 
  Do you have a user named amavisd? If not, you can either create one, or
  modify the configuration file to specify the user the daemon runs as.
 
  From the looks of the error message, you don't have a user called
  amavisd - you should probably create one to make it work properly. I'd
  suggest you set it to disallow interactive login by setting its default
  shell to /bin/false, and set its home directory to wherever amavisd is
  installed.

 the install procedures created two new users:

 clamav100 clamav  Clam Anti Virus Checker /var/clamav 
 /sbin/nologin

 vscan 101 vscan   Virus scan user /var/tmp/bin/sh

 the conf file was originally owned by vscan, should I try to run it as
 vscan ?

No, you should read the error messages and actually LOOK at what they are
telling you.

The error message, plain as day, says

Dec 26 15:24:50 koala su: WARN: running under user '101' (UID=101), the
config file specifies $daemon_user='amavisd' (UID=?)

Read it - the config file specifies $daemon_user='amavisd

In other words, the amavisd configuration file says it should be run by
the user amavisd.

Edit the configuration file, search for $daemon_user, then change it to
read either vscan or clamav and see what happens.

DaZZa


-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html