Note: please note that Liferay has renamed its Liferay Experience
Could offerings to Liferay SaaS (formerly LXC) and
Liferay PaaS (formerly LXC-SM).
Issue
- The default ClamAV settings such as MaxFileSize, MaxScanSize and StreamMaxLength may not be sufficient if the DAM is used to store large files, causing errors on file upload.
- These settings are not configurable e.g. with Environment Variables when using the official ClamAV image.
Environment
- Liferay PaaS with custom ClamAV antivirus service.
Resolution
- Update the existing antivirus service LCP.json, remove the image field and save.
- Create a file called 'Dockerfile' in the existing antivirus service folder, paste the text from the attached Dockerfile, and update the max values (i.e. the 750M values within the sed commands) as required.
- Follow the same approach to update additional values where the first part of the sed command is the original commented or uncommented value from the default clamd.conf e.g. #MaxFileSize 400M and the second part is the replacement e.g. MaxFileSize 750M
- Update the from command tag value if required.
- Save the updated Dockerfile.
- Deploy the newly created build that contains the changes above to the target environment and verify that the antivirus service starts as expected.
- Test that files of the expected file size can be uploaded successfully and review the Liferay DXP service logs etc.
Additional Information
- See here for steps to enable ClamAV antivirus in Liferay PaaS
NOTE: Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión