Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-18-2017, 09:12 AM   #1
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: Fedora (Core) -> CentOS -> RedHat
Posts: 115

Rep: Reputation: 43
Clamdscan - too many characters in a filename?

Hello All,

It's been a while since i've been on this forum & posted a thread - I apologise if this has been posted and answered already (I did search, honest...) I have searched various forums and via search engines.

I'm running 2 * Centos 6.9 (Final) servers. The one with the issue acts as a backup server and FTP server for my domain. The clamdscan clamd daemon rather than clamav is used to automatically scan all files after they have been uploaded.

The following depicts an existing folder structure & filename:

/media/FTP_WIN1/WINDOWS_DATA/DATA/USB_DRIVE/IMAGES/RAW02/RAW02_210816offline_C_full_b1_s1_v1.tib with RAW02_210816offline_C_full_b1_s1_v1.tib referring to the filename.

On scanning the file I receieve the following error message:

/media/FTP_WIN1/WINDOWS_DATA/DATA/USB_DRIVE/IMAGES/RAW02/RAW02_210816offline_C_full_b1_s1_v1.tib: Can't allocate memory ERROR

I have confirmed that if I shorten the filename whilst maintaining the exisiting folder structure, it works perfectly; and if I copy the file maintaining the original name to a higher parent folder and then scan it - this also works. This indicates that the total no. of characters combined in the folders / sub-folders and filename itself are causing the issue.

The clamd.conf configuration file contains the entry

# Stop daemon when libclamav reports out of memory condition.
ExitOnOOM no

Enabling this option does not prevent the above condition occuring.

Thanks for reading this & once again I apologise if this has been raised before.

Has anyone any ideas / suggestions to resolve the issue?


Old 10-18-2017, 09:55 PM   #2
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,519

Rep: Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014
What does the log say?
Old 10-20-2017, 07:58 AM   #3
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: Fedora (Core) -> CentOS -> RedHat
Posts: 115

Original Poster
Rep: Reputation: 43
Originally Posted by AwesomeMachine View Post
What does the log say?
Hello Mr Awesome,

Thanks for coming back to me. Unfortunately there does not seem to be any log entries generated that correspond with this particular issue other than that reported in clamd.log which I have provided.

In addition I have found that if I use clamscan instead of clamdscan then it works perfectly in all situations. I prefer to use the daemon alternative as it is quicker and does not require the use of a ridiculously long command line as it takes its input from a configuration file.



Last edited by Rawcous; 10-20-2017 at 08:21 AM. Reason: Additional information added


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What characters in Linux (or UNIX) filename will cause problems? rnturn Programming 16 08-26-2016 08:23 AM
[SOLVED] grep DIR and FILENAME with [SPACE] and \ characters in name ? czezz Programming 6 06-08-2012 11:37 AM
[SOLVED] Script to pull certain characters from a filename and use in a variable? kmkocot Linux - Newbie 5 10-29-2009 09:10 PM
multilanguage filename characters issue ovidnet Linux - Desktop 4 10-10-2007 03:10 PM
Trying to delete a filename with special characters Harry Seldon Linux - General 11 03-20-2007 01:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration