Aldo Necci | 19 Sep 2011 16:25
Picon
Favicon

open(/var/dcc/map): Permission denied


Hi,

does anyone know why the following would appear in the logs:
dccproc[2304]: open(/var/dcc/map): Permission denied

I'm using last version (dcc-1.3.140) on Scientific Linux release 6.1
and when spamassassin (ver 3.3.1) process an e-mail I get that message.

The same configuration on Scientific Linux CERN SLC release 5.7
and DCC version 1.3.134 works without that message:
DCCD_ENABLE=off
DCCM_ENABLE=off
DCCIFD_ENABLE=on

thanks,
Aldo Necci

-----------------------------------------
This email was sent using SquirrelMail.
https://email.dia.uniroma3.it
Web Site: http://www.squirrelmail.org

Vernon Schryver | 19 Sep 2011 18:10
Favicon

Re: open(/var/dcc/map): Permission denied

> From: "Aldo Necci" <necci@...>

> does anyone know why the following would appear in the logs:
> dccproc[2304]: open(/var/dcc/map): Permission denied

The /var/dcc/map file must be private and readable only by owner,
because it can contain client-IDs and passwords for accessing private
DCC servers.  (The anonmous client-ID of 1 does not use a password.)

`make install` installs dccproc set-UID to the UID specified with
`./configure --with-uid=UID`  The default UID is 0 or root.

It is quite possible that running /var/dcc/libexec/updatedcc
would fix the problem.  Configure builds updatedcc with the
./configure parameters including with-uid.
After fetching the tarball, updatedcc uses `./configure` and `make
install` to `chown` and so forth.
Updatedcc checks to see if it needs to be run by root so that `make`
can `chown` and so forth.

/var/dcc/dcc_conf-new is also built by updatedcc,
and can usually be installed as /var/dcc/dcc_conf

Vernon Schryver    vjs@...
Aldo Necci | 21 Sep 2011 17:36
Picon
Favicon

Re: open(/var/dcc/map): Permission denied

On Mon, September 19, 2011 18:10, Vernon Schryver wrote:
>> From: "Aldo Necci" <necci@...>
>
>> does anyone know why the following would appear in the logs:
>> dccproc[2304]: open(/var/dcc/map): Permission denied
>
> The /var/dcc/map file must be private and readable only by owner,
> because it can contain client-IDs and passwords for accessing private
> DCC servers.  (The anonmous client-ID of 1 does not use a password.)
>
> `make install` installs dccproc set-UID to the UID specified with
> `./configure --with-uid=UID`  The default UID is 0 or root.

OK. The UID is root and that file is private:
-rw-------. 1 root root 7668 Sep 21 17:21 /var/dcc/map

> It is quite possible that running /var/dcc/libexec/updatedcc
> would fix the problem.  Configure builds updatedcc with the
> ./configure parameters including with-uid.
> After fetching the tarball, updatedcc uses `./configure` and `make
> install` to `chown` and so forth.
> Updatedcc checks to see if it needs to be run by root so that `make`
> can `chown` and so forth.
>
> /var/dcc/dcc_conf-new is also built by updatedcc,
> and can usually be installed as /var/dcc/dcc_conf

I have done all. But the problem is still there:
dccproc[9126]: open(/var/dcc/map): Permission denied

(Continue reading)

John R. Levine | 21 Sep 2011 18:11

Re: open(/var/dcc/map): Permission denied

> OK. The UID is root and that file is private:
> -rw-------. 1 root root 7668 Sep 21 17:21 /var/dcc/map

The dcc process usually runs as user "dcc", so the file should belong to 
dcc, not to root.

This is a familiar problem when an update doesn't work quite right.

Regards,
John Levine, johnl@..., Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. http://jl.ly
Vernon Schryver | 21 Sep 2011 18:45
Favicon

Re: open(/var/dcc/map): Permission denied

> From: "Aldo Necci" <necci@...>

> OK. The UID is root and that file is private:
> -rw-------. 1 root root 7668 Sep 21 17:21 /var/dcc/map

> I have done all. But the problem is still there:
> dccproc[9126]: open(/var/dcc/map): Permission denied
>
> The dccproc file is:
> -r-sr-xr-x. 1 root bin 496487 Sep 21 17:21 /usr/local/bin/dccproc

What is the significance of the period (.) after the permission bits?

Just now I tried:
   pax -rzf ...
   cd dcc-1.3.*
   ./configure --homedir=/tmp/dcc --bindir=/tmp/dcc/bin --mandir=/tmp/dcc
   make install

That made:
  -r-sr-xr-x  1 root  wheel  919480 Sep 21 16:18 bin/dccproc*
  -rw-------  1 root  wheel    7668 Sep 21 16:18 map

I see no problems with dccproc:
    % bin/dccproc -C
    asdf: asdf

    asdf
    X-DCC--Metrics: calcite.rhyolite.com 0; Body=1
				reported: 1               checksum
(Continue reading)

Aldo Necci | 22 Sep 2011 10:26
Picon
Favicon

Re: open(/var/dcc/map): Permission denied

On Wed, September 21, 2011 18:45, Vernon Schryver wrote:

>
> What is the significance of the period (.) after the permission bits?
>

Scientific Linux 6 uses the dot after the permission bits as a symbol
of "this is the end of permission bits".

>
> Just now I tried:
>    pax -rzf ...
>    cd dcc-1.3.*
>    ./configure --homedir=/tmp/dcc --bindir=/tmp/dcc/bin --mandir=/tmp/dcc
>    make install
>
> That made:
>   -r-sr-xr-x  1 root  wheel  919480 Sep 21 16:18 bin/dccproc*
>   -rw-------  1 root  wheel    7668 Sep 21 16:18 map
>
> I see no problems with dccproc:
>     % bin/dccproc -C
>     asdf: asdf
>
>     asdf
>     X-DCC--Metrics: calcite.rhyolite.com 0; Body=1
> 				reported: 1               checksum
> 		   Message-ID: d41d8cd9 8f00b204 e9800998 ecf8427e
>
> Does the `cdcc` command also fail?  Cdcc is also installed set-UID
(Continue reading)

Vernon Schryver | 22 Sep 2011 21:26
Favicon

Re: open(/var/dcc/map): Permission denied

> From: "Aldo Necci" <necci@...>
> To: dcc@...

> SpamAssassin is configured to use the right path, this is its configuration:
> use_dcc 1
> dcc_path /usr/local/bin/dccproc
> dcc_home /var/dcc
> dcc_dccifd_path /var/dcc/dccifd

Are you using a current version of SpamAssassin?

Have you tried the SpamAssassin DCC test?   I've forgotten how to
invoke it and do not see it mentioned in
http://spamassassin.apache.org/full/3.3.x/doc/Mail_SpamAssassin_Plugin_DCC.html

I understood that the SpamAssassin people were going to ship the
new version of the SpamAssassin DCC plugin in
/usr/var/dcc/build/dcc/misc/DCC.pm
If that file differs from the DCC.pm you are using, 
it might be entertaining to try it.

> I don't see any UDP connection after dccifd started,
> the output of the command "netstat -pu" is empty and
> there isn't any firewall (I disabled the default software firewall).

Is dccifd running?  If dccifd is running and SpamAssassin can reach
the UNIX domain socket at /var/dcc/dccifd, then SpamAssassin should
never try dccproc.  Since SpamAssassin cannot use dccproc to reach
/var/dcc/map, one might expect problems reaching /var/dcc/dccifd.

(Continue reading)

Aldo Necci | 23 Sep 2011 11:57
Picon
Favicon

Re: open(/var/dcc/map): Permission denied

On Thu, September 22, 2011 21:26, Vernon Schryver wrote:

>> SpamAssassin is configured to use the right path, this is its
>> configuration:
>> use_dcc 1
>> dcc_path /usr/local/bin/dccproc
>> dcc_home /var/dcc
>> dcc_dccifd_path /var/dcc/dccifd
>
> Are you using a current version of SpamAssassin?

Yes I have SpamAssassin 3.3.1 and this is its output:
# spamassassin -V
SpamAssassin version 3.3.1
  running on Perl version 5.10.1

> Have you tried the SpamAssassin DCC test?   I've forgotten how to
> invoke it and do not see it mentioned in
> http://spamassassin.apache.org/full/3.3.x/doc/Mail_SpamAssassin_Plugin_DCC.html

I try this method of testing DCC with Spamassassin as described somewhere:
# spamassassin -D < /usr/share/doc/spamassassin-3.3.1/sample-nonspam.txt

and I got a lot of output, but this is the most important:
Sep 23 10:12:38.503 [2790] dbg: dcc: dccifd local socket chosen:
/var/dcc/dccifd
Sep 23 10:12:38.503 [2790] dbg: dns: entering helper-app run mode
Sep 23 10:12:38.503 [2790] dbg: dcc: connecting to a local socket
/var/dcc/dccifd
Sep 23 10:12:38.640 [2790] dbg: dcc: dccifd got response:
(Continue reading)

Vernon Schryver | 23 Sep 2011 16:28
Favicon

Re: open(/var/dcc/map): Permission denied

> From: "Aldo Necci" <necci@...>

>> Are you using a current version of SpamAssassin?
>
> Yes I have SpamAssassin 3.3.1 and this is its output:

According to http://spamassassin.apache.org/downloads.cgi
the current version is 3.3.2.  But I doubt that matters.

> Sep 23 10:12:38.503 [2790] dbg: dcc: connecting to a local socket
> /var/dcc/dccifd
> Sep 23 10:12:38.640 [2790] dbg: dcc: dccifd got response:
> X-DCC-dcc1-Metrics: mbox2 1182; Body=many Fuz1=many Fuz2=many
> Sep 23 10:12:38.640 [2790] dbg: dns: leaving helper-app run mode
> Sep 23 10:12:38.642 [2790] dbg: dcc: listed: BODY=999999/999999
> FUZ1=999999/999999 FUZ2=999999/999999 REP=0/90

That shows that the problem is related to how dccproc is run for
real mail by postfix+SpamAssassin.  It also shows that postfix+SpamAssassin
is breaking access to the /var/dcc/dccifd socket.

> I haven't any directory named "dcc" under the directory /var

That is my mistake.  /usr/var/dcc/build/dcc exists only after running
/var/dcc/libexec/updatedcc.  You can find DCC.pm in the dcc-1.3.140/misc
directory of the DCC tarball that you expanded and after you run ./configure.

I trust you used the DCC source tarball from
http://www.dcc-servers.net/dcc/#download or
http://www.dcc-servers.net/dcc/source/dcc.tar.Z
(Continue reading)


Gmane