Mailing List Archive

[clamav-users] Using clamav-daemon on Heroku inside Docker
Hi folks,

I'm having some trouble getting the clamav-daemon running on Heroku inside
Docker.

I'm running a simple server with FastAPI to get and check documents
uploaded to an S3 bucket.

I've created an issue for this at
*https://github.com/tutorcruncher/tc-virus-checker/issues/5/
<https://github.com/tutorcruncher/tc-virus-checker/issues/5/>* for those
who would rather comment there.

Deploying runs fine, but the clamav-daemon does not get started, and I
can't figure out why. If I shell in and run service clamav-daemon status, I
get:

chown: invalid user: 'clamav'
chown: invalid user: 'clamav'

It's my understanding that the user clamav gets created when we install
clamav-daemon, and indeed, when I edited my Dockerfile to add them, I get
an error saying they already exist.

Running freshclam downloads the database correctly but then gives me the
following output (presumably because clamav-daemon never ran):

Wed Mar 24 18:38:23 2021 -> ^Clamd was NOT notified: Can't connect to
clamd through /var/run/clamav/clamd.ctl: No such file or directory

Any help would be appreciated.

--
<https://tutorcruncher.com>

*Tom Hamilton Stubber*

+44 (0)207 1128 953
https://tutorcruncher.com
The Food Exchange, New Covent Garden Market, SW8 5EL
TutorCruncher Ltd, registered in England and Wales / Company Number
08385970 / VAT Number GB155868467
Re: [clamav-users] Using clamav-daemon on Heroku inside Docker [ In reply to ]
clamav user is missing from system.

verify that running grep clamav /etc/passwd



Eero

On Wed 24. Mar 2021 at 20.49, Tom Hamilton Stubber via clamav-users <
clamav-users@lists.clamav.net> wrote:

> Hi folks,
>
> I'm having some trouble getting the clamav-daemon running on Heroku inside
> Docker.
>
> I'm running a simple server with FastAPI to get and check documents
> uploaded to an S3 bucket.
>
> I've createdt an issue for this at *https://github.com/tutorcruncher/tc-virus-checker/issues/5/
> <https://github.com/tutorcruncher/tc-virus-checker/issues/5/>* for those
> who would rather comment there.
>
> Deploying runs fine, but the clamav-daemon does not get started, and I
> can't figure out why. If I shell in and run service clamav-daemon status,
> I get:
>
> chown: invalid user: 'clamav'
> chown: invalid user: 'clamav'
>
> It's my understanding that the user clamav gets created when we install
> clamav-daemon, and indeed, when I edited my Dockerfile to add them, I get
> an error saying they already exist.
>
> Running freshclam downloads the database correctly but then gives me the
> following output (presumably because clamav-daemon never ran):
>
> Wed Mar 24 18:38:23 2021 -> ^Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.ctl: No such file or directory
>
> Any help would be appreciated.
>
> --
> <https://tutorcruncher.com>
>
> *Tom Hamilton Stubber*
>
> +44 (0)207 1128 953
> https://tutorcruncher.com
> The Food Exchange, New Covent Garden Market, SW8 5EL
> TutorCruncher Ltd, registered in England and Wales / Company Number
> 08385970 / VAT Number GB155868467
>
> _______________________________________________
>
> clamav-users mailing list
> clamav-users@lists.clamav.net
> https://lists.clamav.net/mailman/listinfo/clamav-users
>
>
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml
>
Re: [clamav-users] Using clamav-daemon on Heroku inside Docker [ In reply to ]
That returns nothing, which makes sense.

The issue is that when I try and create the user in my Dockerfile, I can't
because they already exist.

On Wed, 24 Mar 2021 at 20:23, Eero Volotinen <eero.volotinen@iki.fi> wrote:

> clamav user is missing from system.
>
> verify that running grep clamav /etc/passwd
>
>
>
> Eero
>
> On Wed 24. Mar 2021 at 20.49, Tom Hamilton Stubber via clamav-users <
> clamav-users@lists.clamav.net> wrote:
>
>> Hi folks,
>>
>> I'm having some trouble getting the clamav-daemon running on Heroku
>> inside Docker.
>>
>> I'm running a simple server with FastAPI to get and check documents
>> uploaded to an S3 bucket.
>>
>> I've createdt an issue for this at *https://github.com/tutorcruncher/tc-virus-checker/issues/5/
>> <https://github.com/tutorcruncher/tc-virus-checker/issues/5/>* for those
>> who would rather comment there.
>>
>> Deploying runs fine, but the clamav-daemon does not get started, and I
>> can't figure out why. If I shell in and run service clamav-daemon status,
>> I get:
>>
>> chown: invalid user: 'clamav'
>> chown: invalid user: 'clamav'
>>
>> It's my understanding that the user clamav gets created when we install
>> clamav-daemon, and indeed, when I edited my Dockerfile to add them, I get
>> an error saying they already exist.
>>
>> Running freshclam downloads the database correctly but then gives me the
>> following output (presumably because clamav-daemon never ran):
>>
>> Wed Mar 24 18:38:23 2021 -> ^Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.ctl: No such file or directory
>>
>> Any help would be appreciated.
>>
>> --
>> <https://tutorcruncher.com>
>>
>> *Tom Hamilton Stubber*
>>
>> +44 (0)207 1128 953
>> https://tutorcruncher.com
>> The Food Exchange, New Covent Garden Market, SW8 5EL
>> TutorCruncher Ltd, registered in England and Wales / Company Number
>> 08385970 / VAT Number GB155868467
>>
>> _______________________________________________
>>
>> clamav-users mailing list
>> clamav-users@lists.clamav.net
>> https://lists.clamav.net/mailman/listinfo/clamav-users
>>
>>
>> Help us build a comprehensive ClamAV guide:
>> https://github.com/vrtadmin/clamav-faq
>>
>> http://www.clamav.net/contact.html#ml
>>
>

--
<https://tutorcruncher.com>

*Tom Hamilton Stubber*
*Chief of Operations*

+44 (0)207 1128 953
https://tutorcruncher.com
The Food Exchange, New Covent Garden Market, SW8 5EL
TutorCruncher Ltd, registered in England and Wales / Company Number
08385970 / VAT Number GB155868467
Re: [clamav-users] Using clamav-daemon on Heroku inside Docker [ In reply to ]
Well.

Try installing both packages 'clamav' and 'clamav-daemon'

You should learn how to debug this kind of 'basic stuff'.

Eero

On Wed, Mar 24, 2021 at 9:31 PM Tom Hamilton Stubber <tom@tutorcruncher.com>
wrote:

> That returns nothing, which makes sense.
>
> The issue is that when I try and create the user in my Dockerfile, I can't
> because they already exist.
>
> On Wed, 24 Mar 2021 at 20:23, Eero Volotinen <eero.volotinen@iki.fi>
> wrote:
>
>> clamav user is missing from system.
>>
>> verify that running grep clamav /etc/passwd
>>
>>
>>
>> Eero
>>
>> On Wed 24. Mar 2021 at 20.49, Tom Hamilton Stubber via clamav-users <
>> clamav-users@lists.clamav.net> wrote:
>>
>>> Hi folks,
>>>
>>> I'm having some trouble getting the clamav-daemon running on Heroku
>>> inside Docker.
>>>
>>> I'm running a simple server with FastAPI to get and check documents
>>> uploaded to an S3 bucket.
>>>
>>> I've createdt an issue for this at *https://github.com/tutorcruncher/tc-virus-checker/issues/5/
>>> <https://github.com/tutorcruncher/tc-virus-checker/issues/5/>* for
>>> those who would rather comment there.
>>>
>>> Deploying runs fine, but the clamav-daemon does not get started, and I
>>> can't figure out why. If I shell in and run service clamav-daemon status,
>>> I get:
>>>
>>> chown: invalid user: 'clamav'
>>> chown: invalid user: 'clamav'
>>>
>>> It's my understanding that the user clamav gets created when we install
>>> clamav-daemon, and indeed, when I edited my Dockerfile to add them, I get
>>> an error saying they already exist.
>>>
>>> Running freshclam downloads the database correctly but then gives me
>>> the following output (presumably because clamav-daemon never ran):
>>>
>>> Wed Mar 24 18:38:23 2021 -> ^Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.ctl: No such file or directory
>>>
>>> Any help would be appreciated.
>>>
>>> --
>>> <https://tutorcruncher.com>
>>>
>>> *Tom Hamilton Stubber*
>>>
>>> +44 (0)207 1128 953
>>> https://tutorcruncher.com
>>> The Food Exchange, New Covent Garden Market, SW8 5EL
>>> TutorCruncher Ltd, registered in England and Wales / Company Number
>>> 08385970 / VAT Number GB155868467
>>>
>>> _______________________________________________
>>>
>>> clamav-users mailing list
>>> clamav-users@lists.clamav.net
>>> https://lists.clamav.net/mailman/listinfo/clamav-users
>>>
>>>
>>> Help us build a comprehensive ClamAV guide:
>>> https://github.com/vrtadmin/clamav-faq
>>>
>>> http://www.clamav.net/contact.html#ml
>>>
>>
>
> --
> <https://tutorcruncher.com>
>
> *Tom Hamilton Stubber*
> *Chief of Operations*
>
> +44 (0)207 1128 953
> https://tutorcruncher.com
> The Food Exchange, New Covent Garden Market, SW8 5EL
> TutorCruncher Ltd, registered in England and Wales / Company Number
> 08385970 / VAT Number GB155868467
>
Re: [clamav-users] Using clamav-daemon on Heroku inside Docker [ In reply to ]
If you look at my Dockerfile you can see I'm installing them, and you can
see from my original email that the output of `service clamav-daemon
status` is giving me the user clamav error, rather than a 'service could
not be found' error.

I've got clamav running locally and with GH actions without issue, hence
why I think it's something to do with my configuration with Docker.

Perhaps there is still some 'basic stuff' that I'm missing; feel free to
point it out. I felt like chatting to the community would be the best way
of solving this.

On Wed, 24 Mar 2021 at 20:44, Eero Volotinen <eero.volotinen@iki.fi> wrote:

> Well.
>
> Try installing both packages 'clamav' and 'clamav-daemon'
>
> You should learn how to debug this kind of 'basic stuff'.
>
> Eero
>
> On Wed, Mar 24, 2021 at 9:31 PM Tom Hamilton Stubber <
> tom@tutorcruncher.com> wrote:
>
>> That returns nothing, which makes sense.
>>
>> The issue is that when I try and create the user in my Dockerfile, I
>> can't because they already exist.
>>
>> On Wed, 24 Mar 2021 at 20:23, Eero Volotinen <eero.volotinen@iki.fi>
>> wrote:
>>
>>> clamav user is missing from system.
>>>
>>> verify that running grep clamav /etc/passwd
>>>
>>>
>>>
>>> Eero
>>>
>>> On Wed 24. Mar 2021 at 20.49, Tom Hamilton Stubber via clamav-users <
>>> clamav-users@lists.clamav.net> wrote:
>>>
>>>> Hi folks,
>>>>
>>>> I'm having some trouble getting the clamav-daemon running on Heroku
>>>> inside Docker.
>>>>
>>>> I'm running a simple server with FastAPI to get and check documents
>>>> uploaded to an S3 bucket.
>>>>
>>>> I've createdt an issue for this at *https://github.com/tutorcruncher/tc-virus-checker/issues/5/
>>>> <https://github.com/tutorcruncher/tc-virus-checker/issues/5/>* for
>>>> those who would rather comment there.
>>>>
>>>> Deploying runs fine, but the clamav-daemon does not get started, and I
>>>> can't figure out why. If I shell in and run service clamav-daemon
>>>> status, I get:
>>>>
>>>> chown: invalid user: 'clamav'
>>>> chown: invalid user: 'clamav'
>>>>
>>>> It's my understanding that the user clamav gets created when we
>>>> install clamav-daemon, and indeed, when I edited my Dockerfile to add them,
>>>> I get an error saying they already exist.
>>>>
>>>> Running freshclam downloads the database correctly but then gives me
>>>> the following output (presumably because clamav-daemon never ran):
>>>>
>>>> Wed Mar 24 18:38:23 2021 -> ^Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.ctl: No such file or directory
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> --
>>>> <https://tutorcruncher.com>
>>>>
>>>> *Tom Hamilton Stubber*
>>>>
>>>> +44 (0)207 1128 953
>>>> https://tutorcruncher.com
>>>> The Food Exchange, New Covent Garden Market, SW8 5EL
>>>> TutorCruncher Ltd, registered in England and Wales / Company Number
>>>> 08385970 / VAT Number GB155868467
>>>>
>>>> _______________________________________________
>>>>
>>>> clamav-users mailing list
>>>> clamav-users@lists.clamav.net
>>>> https://lists.clamav.net/mailman/listinfo/clamav-users
>>>>
>>>>
>>>> Help us build a comprehensive ClamAV guide:
>>>> https://github.com/vrtadmin/clamav-faq
>>>>
>>>> http://www.clamav.net/contact.html#ml
>>>>
>>>
>>
>> --
>> <https://tutorcruncher.com>
>>
>> *Tom Hamilton Stubber*
>> *Chief of Operations*
>>
>> +44 (0)207 1128 953
>> https://tutorcruncher.com
>> The Food Exchange, New Covent Garden Market, SW8 5EL
>> TutorCruncher Ltd, registered in England and Wales / Company Number
>> 08385970 / VAT Number GB155868467
>>
>

--
<https://tutorcruncher.com>

*Tom Hamilton Stubber*
*Chief of Operations*

+44 (0)207 1128 953
https://tutorcruncher.com
The Food Exchange, New Covent Garden Market, SW8 5EL
TutorCruncher Ltd, registered in England and Wales / Company Number
08385970 / VAT Number GB155868467