Cant Upload more then 10mb file size

Nextcloud version 20.0.6
Operating system and version Ubuntu 20.04
Apache or nginx version Apache 2.4.25)
PHP version 7.4

The issue you are facing:
When uploading any 10mb of file of any type MIME I will get error

Operation is blocked by access control

Below then 10mb is fine

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. upload file more then 10mb

The output of your Nextcloud log in Admin > Logging:

NOTHING

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocpgglo1758f',
  'passwordsalt' => 'NP5Mq0KLzJBwoGiALHtOT8GJBSX1wK',
  'secret' => 'GcnlDAXn25b8v7Z67wQtegVf2GOEu+rLjDLyOhx4GKZk0jwI',
  'trusted_domains' => 
  array (
    0 => 'server.kpzara.com',
  ),
  'datadirectory' => '/home/runcloud/webapps/servernext/data',
  'dbtype' => 'mysql',
  'version' => '20.0.6.1',
  'overwrite.cli.url' => 'https://server.kpzara.com',
  'dbname' => 'server1db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'server1user',
  'dbpassword' => 'xxx',
  'installed' => true,
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

2021/01/30 20:28:43 [error] 1715#1715: *31 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "MOVE /remote.php/dav/uploads/admin/web-file-upload-41550fb56574400929020149133930a4-1612038523044/.file HTTP/2.0", host: "server.kpzara.com"
2021/01/30 20:27:32 [error] 1715#1715: *31 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "GET /data/.ocdata?t=1612038453319 HTTP/2.0", host: "server.kpzara.com"
2021/01/30 20:27:32 [error] 1715#1715: *31 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "PROPFIND /.well-known/carddav HTTP/2.0", host: "server.kpzara.com"
2021/01/30 20:27:32 [error] 1715#1715: *31 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "PROPFIND /.well-known/caldav HTTP/2.0", host: "server.kpzara.com"
2021/01/30 20:25:30 [error] 1715#1715: *178 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "MOVE /remote.php/dav/uploads/admin/a43143bde4ac6f2dcc3683f070949a8e/.file HTTP/1.1", host: "server.kpzara.com"
2021/01/30 20:23:34 [error] 1715#1715: *31 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "MOVE /remote.php/dav/uploads/admin/web-file-upload-1aa7d8530f93e735829f820c5749ac46-1612038213145/.file HTTP/2.0", host: "server.kpzara.com"
2021/01/30 20:23:16 [error] 1715#1715: *31 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "MOVE /remote.php/dav/uploads/admin/web-file-upload-41550fb56574400929020149133930a4-1612038195022/.file HTTP/2.0", host: "server.kpzara.com"
2021/01/30 20:22:57 [error] 1715#1715: *31 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "MOVE /remote.php/dav/uploads/admin/web-file-upload-41550fb56574400929020149133930a4-1612038175704/.file HTTP/2.0", host: "server.kpzara.com"
2021/01/30 20:10:31 [error] 5483#5483: *2311 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "MOVE /remote.php/dav/uploads/admin/a43143bde4ac6f2dcc3683f070949a8e/.file HTTP/1.1", host: "server.kpzara.com"
2021/01/30 20:05:22 [error] 5483#5483: *1937 access forbidden by rule, client: 115.135.18.89, server: server.kpzara.com, request: "MOVE /remote.php/dav/uploads/admin/web-file-upload-5a761b978056ee737d0d9b8ec2f0e73f-1612037122305/.file HTTP/2.0", host: "server.kpzara.com"

Hello,
did you look at the upload_max_filesize php directive in php.ini ?
Perhaps, you just have to increase its value.

php_value[memory_limit] = 800M
php_value[post_max_size] = 512M
php_value[upload_max_filesize] = 512M

Do you by any chance have modsecurity installed?

I had the same issue after upgrading to NC 22.

Seems, this is due to the file chunk limit of 10mb, set within NC when uploading large files; these file chunks are located in the /nextcloud/data/USERxxx/uploads folder;

The easiest workaround seems to just increase the file chunk size in the nextcloud database (MySQL, or PostgreSQL), as described in

Note than one may also need to increase
client_body_timeout to e.g. >1000; (for large uploads)
depending on your network speed ;
I did not have time to do a full fix but this seems to work

If anybody wants the fix instead of a workaround, it’s an nginx/Apache config problem. See here for gory details Chunked upload not working (Files larger than 10MB) · Issue #8802 · nextcloud/server · GitHub Basically the chunks get uploaded fine, but then NC is unable to move them due to an over-restrictive location ~ /\. { deny all; } line that should be changed.