[clamav-users] Clam AV error 127
G.W. Haywood
clamav at jubileegroup.co.uk
Tue Dec 1 12:39:16 UTC 2020
Hi there,
On Tue, 1 Dec 2020, Pappas, Shaun S via clamav-users wrote:
> We are getting error 127 when we run the clamscan command in an AWS Lambda written in Java
>
> From the logs the command we are running is :
> /var/task/clamscan --database=/tmp/antivirus-data/ /tmp/antivirus-data/files-to-scan/ZA34576/023c1fee-f3e6-44a9-88b3-643e15e5adeb/9c4225b5-0d3c-42ee-9fa6-e3e61eb34d76
>
> Java code snippet:
> String command = antivirusDir + "/clamscan --database=" + WORKING_DIR + " " + pathStr;
> Process p = Runtime.getRuntime().exec(command);
> p.waitFor();
> if (p.exitValue() == 0) {
> return FileStatus.CLEAN;
> } else if (p.exitValue() == 1) {
> return FileStatus.INFECTED;
> }
>
> p.exitValue() is returning 127
>
> The clam AV definitions are being downloaded from s3 to /tmp/antivirus-data/ folder.
>
> Could we get some help on the above please ?
I'm not sure what your interpreter is doing with the codes but it
looks to me like a standard operating system error code. See for
example your favourite search engine and things like
https://stackoverflow.com/questions/1763156/127-return-code-from
If I had to guess, '/var/task/clamscan' does not exist, or it is not
executable for the right user, or simply fails to run. Perhaps the
permissions are wrong, a library is missing, broken, or compiled for
the wrong architecture or something like that. Have you tried running
it at the command line as the user which is expecting to run the job?
--
73,
Ged.
More information about the clamav-users
mailing list