Can't change Max Upload

Hiii Guys

I have a little problem with my Nextcloud installation.

Problem: I can’t change my Max Upload Limit. I have 20 MB in a grey color and no access to change this limit.
Do you know the Problem?

Can you help me please:)

Thanks for your reply,

Flavio

Answered earlier today :slight_smile:

Thanks Jason for your reply. The problem is not solved.

.htaccess
php_value post_max_size 200M
php_value memory_limit 200M

Apache2 vhost:
<Directory /var/www/…/…/ >
Options +FollowSymlinks
AllowOverride All

Dav off

File Permission .htaccess
-rwxr–r-- 1 root www-data 57 Dez 13 17:33 .htaccess

Thanks for helping,

Flavio

Your .htaccess is owned there by root :slight_smile:
Moreover, did you update your php.ini file and does your main apache.conf have the same allow override set?

I’ve found the solution, my permission script was false

False script:
#!/bin/bash
ncpath=/'
htuser='www-data’
htgroup='www-data’
rootuser=‘root’

printf "Creating possible missing Directories\n"
mkdir -p $ncpath/data
mkdir -p $ncpath/assets
mkdir -p $ncpath/updater

printf "chmod Files and Directories\n"
find ${ncpath} -type f -print0 | xargs -0 chmod 0640
find ${ncpath} -type d -print0 | xargs -0 chmod 0750

printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ncpath}
chown -R ${htuser}:${htgroup} ${ncpath}/apps/
chown -R ${htuser}:${htgroup} ${ncpath}/assets/
chown -R ${htuser}:${htgroup} ${ncpath}/config/
chown -R ${htuser}:${htgroup} ${ncpath}/data/
chown -R ${htuser}:${htgroup} ${ncpath}/themes/
chown -R ${htuser}:${htgroup} ${ncpath}/updater/

chmod +x ${ncpath}/occ

printf "chmod/chown .htaccess\n"
if [ -f ${ncpath}/.htaccess ]
then
chmod 0644 ${ncpath}/.htaccess
chown ${rootuser}:${htgroup} ${ncpath}/.htaccess
fi
if [ -f ${ncpath}/data/.htaccess ]
then
chmod 0644 ${ncpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ncpath}/data/.htaccess
fi

But this permission script is from the official nextcloud installation manual.

Nextcloud please fix this permission script

This is not the current script for the current version of NC. Since NC 10 at least “$ncpath/assets” does not exist anymore.

Also there is no error in it. For security reasons it is wanted, that the .htaccess files are owned by root, so for sure no manipulation with the http user is possible. If you want to change the upload size or do an update with the online updater, the http user need to own the whole nc directory. But this should be not the every day state and the script should be applied again directly after update/configuration.

But ya, I agree that it’s somehow confusing, that after installing and configuring the nc server as expected by the manual, there is a setting not usable and without any hint. Maybe it would be a good idea to find another way for adjusting the max upload size for nc. Maybe inside of the config.php or even the database, whereas the size allowed by the php-server then needs to be unlimited. At least some more detailed hint about the permissions beside the grey settings box would be helpful ;).

1 Like