.htaccess doesn't work with php7 and oc 10.2


we are running owncloud 10.2 on a Debian 9 VM with php 7. We could not manage to set the desired .htaccess file in the install directory to restrict upload_max_filesize and post_max_size. Even the setup of the apache php.ini didn’t work.

Can you guys help me out?

Thx in advance.


it seems you have already found/posted in 10.0.3 no option to configure upload limits within the GUI. If i’m understanding this topic correctly the Web GUI as well as the sync clients are uploading the files in small chunks so it seems to me that you can’t restrict the upload size via the web server configuration.

1 Like

I just wanted to verify this information. Thank you very much.

You guys should actualize your doc https://doc.owncloud.org/server/10.2/admin_manual/configuration/files/big_file_upload_configuration.html it’s pretty misleading.

1 Like

I’m not sure I understand what you’re trying to achieve, are you trying to restrict the maximum file size to something like 500MB? If yes, you should be able to disable chunking (somewhere in this forum I’ve described how to do this) and then your settings should block bigger uploads.

What do you find misleading about the documentation?

Anybody can participate in the docs, perhaps you could create an issue in the github repo?

1 Like


well I think he’s talking about the fact that it’s useless to configure the upload_max_filesize or post_max_size since ownCloud is chunking thus this section is “obsolete”. If I’m correct it’s cut in 10MB chunks so it’s pretty rare your PHP is lower than that.

There is still no chunking on a public folder guest upload, so these settings are still necessary in this case.

1 Like

Thanks for your answer, mh I don’t think I’ve ever used that feature, not that I don’t believe you, nevertheless are you sure of that ? Do you have any material or test process ?


i think the same also applies for other/3rdparty WebDAV clients not using chunked uploads.

I’m not sure how many users here have the knowledge to update the documentation. :slightly_frowning_face: I think its better to directly ask the ownCloud development team for such changes at the github issue tracker of the documentation which was previously mentioned.

1 Like

Alright, I tried to upload 1GB (my server doesn’t allow 1GB) and @eneubauer you’re right:

$ curl -s --user 'xxx:yyy' -T 1GB.zip https://xxxcloud.com/remote.php/dav/files/xxx/1GB.zip
<head><title>413 Request Entity Too Large</title></head>
<center><h1>413 Request Entity Too Large</h1></center>

Well there NGinx yells first but I assume if I increase it and not PHP, this one will also yell.

Nevertheless uploading small files does work with a simple curl.

1 Like

No material or test process, just had a case recently where an upload of a large file into such a folder failed, even though all these settings for big file uploads were set. While investigating the issue I noticed that chunking wasn’t used.

The upload was taking longer than 1 hour because of file size and connection speed, and therefore the exclusive file lock for the upload disappeared in Redis, as by default, there is a TTL on file locks which is one hour. The fix was to set filelocking.ttl to something very large in the config.php.


@eneubauer Thanks for you explanation !
I guess it would be a good thing to improve the doc to explain that these big files settings should be set if you need some uploads from a different webdav client than ownCloud’s and maybe also the specification about the filelocking.ttl.



i think this could definitely makes sense. Does some one of you guys have a github account to let the ownCloud team know about a possible improvement in the documentation?

Hey, @eneubauer opened one on github :wink:

1 Like