greyltc / docker-owncloud

Arch linux based docker container with owncloud
111 stars 37 forks source link

File Size Upload Limit > 2 MB #83

Closed McBadass closed 8 years ago

McBadass commented 8 years ago

When I attempt to change the upload size to higher than 2 MB from the Admin console, it refuses to save the changes. It says it may take up to 5 minutes to change, but refreshing after 5 minutes and it's back to the default of 2 MB.

This is on the latest version as of today (I believe 9.0.0.1).

cguentherTUChemnitz commented 8 years ago

Same for me. I am running 9.0.0-1.

As mentioned in the old manual for owncloud 8: https://doc.owncloud.org/server/8.0/admin_manual/configuration_files/big_file_upload_configuration.html

Correct values are present in the following files: owncloud/.htaccess owncloud/.user.ini

Nevertheless, the administration panel sticks at 2MB.

Additionally i can't find an updated version of this manual.

greyltc commented 8 years ago

I could have sworn I tested this. What happens when you upload a 10MB file?

greyltc commented 8 years ago

I bet I know what's going on here; You've got the wrong permissions on one of the volumes you've mapped into the container. The http user needs to have write access to a few critical configuration files in order for this config change to apply (it should be instant because I'm not using php-fpm here).

I've implemented a blanket fix for all incorrect permissions associated with the oc server in my container: While your container is running (let's assume you've named it oc), issue the following command

docker exec -it oc sh -c 'set-oc-perms runtime'

Then try to edit your max upload file size and let me know here if that solves your issue please.

McBadass commented 8 years ago

This has worked without issue before, and I don't think any of my permissions have changed since then. Regardless, I ran the command you posted and it didn't appear to solve the issue. I restarted the container after and it still doesn't seem to save.

bpillatsch commented 8 years ago

/etc/php/php.ini: Changing php_value upload_max_filesize = 2M php_value post_max_size = 8M

Resolve the issue, not sure why these need manual intervention, but the UI is correctly updating .htaccess and .user.ini

cguentherTUChemnitz commented 8 years ago

The workaround from @bpillatsch works for me. So the remaining question is, why the php service uses its global config in /etc/php/php.ini instead of the owncloud defined stuff in owncloud/.htaccess and owncloud/.user.ini.

best, Christian

greyltc commented 8 years ago

This is a bug in ownCloud version 9.0 its self, not this container per se: https://github.com/owncloud/core/issues/21146

It has been fixed in OC version 9.0.1 (which has not been released yet).

For now, I've hacked a fix for this into my container like this: https://github.com/l3iggs/docker-owncloud/commit/e75c32166c7e2114d4b7db43fa62a1aa578ebfab

So l3iggs/owncloud:latest should not have this issue any more.