ownCloud and NextCloud : maximum file upload size limit (EN version)

After installing and testing this cloud service on a server of mine on internet, I find a noisy problem: when I try uploading a file bigger than 512Mb the cloud service stop uploading.
Considering that a lot of people uses cloud services as backup for pics and videos, I found out this limit really frustating.

I have not found the way to change this limit via web interface, so I do it via console, on the server where ownCloud was installed.

As first thing I verified limits set up in /etc/php5/apach2/php.ini:

1.    upload_max_filesize should be set more than default 512mb: I set to 1024M
2.    post_max_size should be set more than default 512mb: I set to 1024M
3.    upload_tmp_dir must point to a valid read/write access directory: I set to /tmp

Once done, I reloaded apache2 config files, as usual, with service apache2 reload, but the change to upload_max_filesize seems have no effect and ownCloud still refuse to load file bigger than 512mb

So I gave a look to the ownCloud specific .htaccess file, you find it in the root of the owncloud installation dir, on ubuntu system it is at /var/www/owncloud/.htaccess.
You must edit the line php_value upload_max_filesize 512M to the value you set in apache php.ini or smaller. I set both to 1024M and not to 1G couse I found no info on notation usable in the ownCloud documentation. So I kept the original notation.

At https://secure.php.net/manual/en/ini.core.php#ini.post-max-size found info about size notation: 

PHP allows shortcuts for byte values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you’re using 32bit versions) as it will cause your script to fail.

The last problem is that after the modification, in the webclient the uploadable maximum size reported was still 512Mb.

On truth it was false, couse I already uploaded files larger than  512Mb after the modification I reported above.
In any case to solve this problem, again edit .htaccess file on the line php_value post_max_size to the corresponding upload_max_filesize value. Once done also this problem is solved.

Hope this can help anyone who finds 512Mb too small as upload limit.

2 Comments

  1. It’s a pita that it can be so hard to configure. Note that there is a graphical setting in ownCloud 8.1 where you can configure the upload size. If it is greyed out, your configuration doesn’t allow ownCloud to control it and your steps above are needed.

    Rispondi

    1. I’ve tried with several attrs configuration but never been able to use that configuration setup in he grafical interface: if I’ve been able to, do you think I would find this complicate way to set it ? 🙂

      JC

      Rispondi

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.