0

I am facing an issue trying to upload a .xlsx file with a java application, the application scans the file with clamav antivirus before uploading it. I am getting the error below, does anyone have an idea ?

The validation of the upload transaction failed: A ValidationException occurred: [Validation error for property: 'null': An unexpected error occurred while scanning file 'test.xlsx': /tmp/jfile_502-814144_test.xlsx.part: Can't write to file ERROR.

codow
  • 9
  • 4
  • Are you running the app as a user who does not have write permission on the spreadsheet file? – g00se Mar 09 '22 at 15:19
  • I am running it as a normal user, I don't get the error when uploading another file, like a pdf, and there is enough space for the antivirus to copy the file to the /tmp directory – codow Mar 09 '22 at 15:47
  • You're implying that disk space is low on /tmp partition? – g00se Mar 09 '22 at 15:49
  • no there is no probleme with space, the directory has 1go free space and the file to scan has only 90Mo – codow Mar 09 '22 at 15:54
  • That error message is coming from Clam? If so, how are you running it? – g00se Mar 09 '22 at 15:57
  • it is coming from the log file of the java application, the app runs the antivirus on every file upload, scans the file and then sends it – codow Mar 09 '22 at 16:38
  • My best guess at the moment is to restate that the java process owner has no write permission on /tmp/jfile_502-814144_test.xlsx – g00se Mar 09 '22 at 16:44
  • this could be the reason, given the error message in the logs. But this issue is not produced when scanning other files, so my guessing is that's probably a problem with file itself – codow Mar 10 '22 at 11:19
  • Difficult to know without being able to inspect the situation. Maybe some sort of locking problem? Worth taking a look maybe with something like sudo lsof | grep '502-814144' – g00se Mar 10 '22 at 11:56
  • this could be the reason, given the error message in the logs. But this issue is not produced when scanning other files, so my guessing is that's probably a problem with file itself. but for the scan it's the clamav daemon that manipulates the file and analyses it, then it will be sent. – codow Mar 10 '22 at 12:58
  • the problem was solved, by taking a look to the messages log file, it appears to be a problem of space indeed. although there was enough before the issue occured, when I increased it, the AV scans normally. thank you for your suggestions @g00se – codow Mar 22 '22 at 13:07
  • Glad you sorted it out – g00se Mar 22 '22 at 13:09

0 Answers0