"No free space" when uploading files > 0 kb via web interface

Hi,

I noticed that after I changed the server my Nextcloud instance is running on, I cannot upload or delete files > 0 kb with the web interface anymore.
When uploading, the message “No free space” appears, although there is enough free disk space, the user has enough free quota and the data directory is writable. Uploading and deleting empty text documents (0 kb) works fine.
Every action via webdav (upload/delete) works fine.

There is nothing inside the Nextcloud or nginx error log.

Nextcloud 15.0.0.10
ISPConfig 3.1.13
Nginx/1.10.3
php 7.3.0
MariaDb 10.3.12
Redis 3.2.6-3

Nextcloud config:

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'domain.com',
  ),
  'datadirectory' => '/var/www/domain.com/private/cloud_data',
  'overwrite.cli.url' => 'https://domain.com',
  'dbtype' => 'mysql',
  'version' => '15.0.0.10',
  'dbname' => 'xxx',
  'dbhost' => '127.0.0.1',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_smtpmode' => 'sendmail',
  'mail_from_address' => 'noreply',
  'mail_domain' => 'domain.com',
  'mail_smtphost' => 'domain.com',
  'appstore.experimental.enabled' => true,
  'mail_smtpport' => '25',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'service@domain.com',
  'mail_smtppassword' => 'xxx',
  'loglevel' => 0,
  'theme' => '',
  'maintenance' => false,
  'versions_retention_obligation' => 'disabled',
  'htaccess.RewriteBase' => '/',
  'singleuser' => false,
  'filelocking.enabled' => 'true',
  'asset-pipeline.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
    'timeout' => 0,
  ),
  'updater.release.channel' => 'stable',
);

Nginx config:

server {
    listen ip:80;

    listen ip:443 ssl;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_certificate /var/www/clients/client1/web6/ssl/cloud.mydomain.com-le.crt;
    ssl_certificate_key /var/www/clients/client1/web6/ssl/cloud.mydomain.com-le.key;

    server_name cloud.mydomain.com;

    root   /var/www/cloud.mydomain.com/web/;



    index index.html index.htm index.php index.cgi index.pl index.xhtml;



    error_log /var/log/ispconfig/httpd/cloud.mydomain.com/error.log;
    access_log /var/log/ispconfig/httpd/cloud.mydomain.com/access.log combined;

    location ~ /\.(ht|git) {
                    deny all;
    }

    location ^~ /.well-known/acme-challenge/ {
		access_log off;
		log_not_found off;
		root /usr/local/ispconfig/interface/acme/;
		autoindex off;
		index index.html;
		try_files $uri $uri/ =404;
    }

    location = /favicon.ico {
        log_not_found off;
        access_log off;
        expires max;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }

    location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
    }

    location /stats/ {

        index index.html index.php;
        auth_basic "Members Only";
        auth_basic_user_file /var/www/clients/client1/web6/web//stats/.htpasswd_stats;
    }

    location ^~ /awstats-icon {
        alias /usr/share/awstats/icon;
    }

    location ~ \.php$ {
        try_files /6cf50b28e669ad540e9c5c6ef0879fbd.htm @php;
    }

    location @php {
        try_files $uri =404;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/var/lib/php-fpm/web6.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors on;
    }




    client_max_body_size        5G;
    client_body_buffer_size     100M;

        add_header Strict-Transport-Security "max-age=15552000";
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;
        add_header Referrer-Policy no-referrer;


        rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
        rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

    location = /.well-known/carddav {
            return 301 $scheme://$host/remote.php/dav;
    }
    location = /.well-known/caldav {
            return 301 $scheme://$host/remote.php/dav;
    }

    location /.well-known/acme-challenge {

    }

        fastcgi_buffers 64 4K;

        gzip off;


        error_page 403 /core/templates/403.php;
        error_page 404 /core/templates/404.php;

    location / {
            rewrite ^ /index.php$uri;
    }

    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
            return 404;
    }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
            return 404;
    }

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
            fastcgi_split_path_info ^(.+\.php)(/.*)$;
            include fastcgi_params;
            fastcgi_read_timeout 300;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param HTTPS on;
            fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
            fastcgi_param front_controller_active true;
            fastcgi_pass unix:/var/lib/php-fpm/web6.sock;
            fastcgi_intercept_errors on;
    }

    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
            try_files $uri $uri/ =404;
            index index.php;
    }

    location ~* \.(?:css|js)$ {
            try_files $uri $uri /index.php$uri$is_args$args;
            add_header Cache-Control "public, max-age=7200";
            add_header Strict-Transport-Security "max-age=15552000";
            add_header X-Content-Type-Options nosniff;
            add_header X-Frame-Options "SAMEORIGIN";
            add_header X-XSS-Protection "1; mode=block";
            add_header X-Robots-Tag none;
            add_header X-Download-Options noopen;
            add_header X-Permitted-Cross-Domain-Policies none;
            access_log off;
    }

    location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
            try_files $uri /index.php$uri$is_args$args;
            access_log off;
    }

    location ~* /\.(?:!well-known|file\/) {
    deny all; 
    }
}

Could you please help me?

I like that you posted your nginx conf in a code window…but your nextcloud config as plain text, making it harder to read

Done, I struggled with the editor not formatting the lines as code because of a missing newline before the code block. Thanks.

Does anybody have an idea? The issue is still present after updating to 15.0.2.
Thanks!

< removed >

Note: I just tested uploading files with the file drop feature (shared links) and it works.

I have the same issue, my nextcloud installation is exposed bheind a reverse proxy, both (webserver and proxy) are Centos 7 with nginx and i use php 7.3 (from remi repository).
If I upload file from shared links, webdav or mobile app everything works well, but from the webui I recive the message “Not enough space”.
I don’t have any error in the nginix, nextcloud or php log, and I have applied all tips suggested in the summary page (DB, xforwarder, cache, etc…)

1 Like

Did you solve the issue or got any further ideas? The current behavoir makes Nextcloud pretty much unusable.
By the way, i placed a small PHP script that writes files into my user’s data directory inside the webroot and it perfectly works. So no issue with file permissions or open_basedir restrictions here.

Comment this out and also this one,

    location ~ /\. {
                   deny all;
   }

They’ll mess up your instance.
Check them again on every ISPConfig update (just to be sure).

I found a better way to deal with this,

In you ISPConfig console, on the nginx directives add,

# ISPConfig remove default template conflict with nextcloud
location ~ \.php$ {##delete##
}
location ~ /\. {##delete##
}

Cheers!