nextcloud / all-in-one

📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.
https://hub.docker.com/r/nextcloud/all-in-one
GNU Affero General Public License v3.0
4.63k stars 555 forks source link

Cannot upload files larger than 100 MB via share link because of ClamAV #4918

Open saytamkenorh opened 1 week ago

saytamkenorh commented 1 week ago

Steps to reproduce

  1. Verify that logged in user can upload files larger than 100 MB through the Files app via the New button
  2. Create a folder with a "File Drop" share link or a share link with modify rights
  3. Try to upload a file larger than 100 MB using the link (it does not matter if the link is opened in the same browser window or in an anonymous window where a Nextcloud user is not logged in)

Expected behavior

File uploads without any problems.

Actual behavior

File does not upload. The user sees a message that an unknown error occurred.

An error also appears in the Event Log:

BadRequest Expected filesize of 325033371 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 134111232 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.

When I changed the files_antivirus av_stream_max_length setting via occ to the equivalent of 300 MB, the upload works fine but another error appears in the event log: Failed to write a chunk. Check if Stream Length matches StreamMaxLength in anti virus daemon settings. I should probably also change the settings in the /etc/clamav/clamd.conf file but this would require modifying the ClamAV container. Nevertheless, it is certain that the antivirus somehow blocks the file upload.

Host OS

Debian 12.5

Nextcloud AIO version

v8.3.0

Current channel

latest

Other valuable info

Running behind a nginx reverse proxy

szaimen commented 1 week ago

Hi, thanks for you report! I'll probably have a look next week.