How to increase upload file size in owncloud

By default server environment will allow the user’s to upload maximum 2MB of file via web browser for security reason. It was controlled by Global php.ini file and it will accessible to root user. In owncloud installation they have mentioned maximum upload file size to 512MB in .htaccess file. But its not taking effect. I don’t know, why ?

I was worked on many website regarding upload file size issue with php.ini file. So i will prefer the php.ini file to do the same in owncloud installation on my site.

1) Default upload file size ?

See the below screen shot which is clearly shows the default upload file size is 2MB.

2) php.ini file configuration

Create the php.ini file under owncloud installation directory and past the below value.

root@server [~]# nano php.ini
  GNU nano 2.0.9                             File: php.ini

upload_max_filesize = 1GB
post_max_size = 1GB

3) Getting error after creating php.ini file ?

When, i’m working on this issue, i will face few more minor errors and i resolved based on that. See the below steps which i taken.
1) After putting the code into php.ini file, i will get below error message, see the screen shot.

Fatal error: Class 'PDO' not found in /home/owncloud2daygeek/public_html/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 148

2) The above error message clearly shows PDO not found, Now i’m going to check the server whether PDO modules are installed/enabled or not. Use the below command to check

root@server [~]# php -m
[PHP Modules]

[Zend Modules]
Zend Guard Loader
the ionCube PHP Loader

Its clearly shows, its installed and enabled in server.
3) Then i have checked the global php.ini file whether the extension is called into php.ini file or not.

root@server [~]# nano /usr/local/lib/php.ini
  GNU nano 2.0.9                                       File: /usr/local/lib/php.ini

; Dynamic Extensions ;
; If you wish to have an extension loaded automatically, use the following
; syntax:
extension = ""
extension = ""
extension = "
; For example, on Windows:
; ... or under UNIX:
; Note that it should be the name of the module only; no directory information
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.

Its clearly shows, the extension is called in global php.ini file.
4) Finally i have added those extension to under owncloud php.ini file and its started working.

root@server [~]# nano php.ini
  GNU nano 2.0.9                             File: php.ini
upload_max_filesize = 1GB
post_max_size = 1GB

4) Upload size is increased to 1GB ?

See the below screen shot which is clearly shows the new upload file size is 1GB.

5) Method-2 : Alternative Way

Alternatively you can do it using below simple way.
>>admin (User Name)>>Admin >>File Handling >> Here you can set the upload size, how much you want.

We are preparing all articles in-depth to understand by all level/stage Linux administrators. If the article is useful for you, then please spend less than a minute to share your valuable comments in our commenting section.

Please stay tune with us…Good Luck.

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

7 Comments on “How to increase upload file size in owncloud”

  1. Hi All,

    Recently i installed owncloud but unable to change the max upload value as it is greyout to the value 2MB tried all the above ways but no luck..Can any one help me out here..!!

    Thanks in advance..

  2. Hi Magesh
    Ownlcoud runs and uploads files, small files up to about 20m
    When hovering over the upload button we get 512MB which we’ve set everywhere humanly possible.
    a 200meg file uploads and, then after we get yellow popup message at the top of the page “Not Found”
    error logs gives disk space error. Whicj is not true, enough sapce.

    Running IIS with PHP and Fastcgi properly configured.
    Any ideas on this

Leave a Reply

Your email address will not be published. Required fields are marked *