OwnCloud - Increase Max File Upload Size

| Servers | 22 seen

It has been more than 2 years, since I installed (set and forgot) OwnCloud for internal file sharing. 

For the past two years OwnCloud have worked like a charm (and still does). Just today I faced a problem - I tried to upload file larger than 513 MB (default max file for OwnCloud), but struck because of exceeding max file upload size. I really needed to deliver this file across few continents as quick as possible. Well I could probably use direct file upload on bare ftp, but this is not the case. I went hunting for a quick solution to increase max upload file size on OwnCloud.

Luckily I found this tutorial, explaining how things are handled in OwnCloud and how to upload files bigger than 512 MB.

The fun part follows now - As I did set Owncloud more than two years ago, I had forgotten all server login details, and ended using Linode Lish access to gain back control of this server. I keep notes after each setup, so after a brief mail search I did found missing login details anc could proceed.

Our OwnCloud file sharing setup had been running on a separate Linode VPS with Ubuntu 14.04 on it. The installation I did back then was running Apache server (I'm a Nginx person). The biggest mystery for me was to locate .htaccess file, turned out it has been missing, so I ended up using following Apache commands to enable and configure .htaccess.

Enabling mod_rewrite

sudo a2enmod rewrite

This will activate the module or alert you that the module is already in effect. To put these changes into effect, restart Apache.

sudo service apache2 restart

Locating Owncloud .htaccess

It took me some 30 minutes to locate .htaccess file, in my case it was here /var/www/owncloud/.htaccess

​Making changes to .htaccess

add following lines to increase max_file_upload size

php_value upload_max_filesize = 16G 
php_value post_max_size = 16G

Adjust these values for your needs.

Restart Apache

sudo service apache2 restart

Add new comment