File Upload fails - Folder creation works?!

Hi forum,

my cloud is running since a few weeks without any problems. Since last, i got synching errors with my windows client, i was not able to upload any files. Folder creation works. I am running latest nextcloud 14.0.4 on a raspi 3+ with apache and php,

The admin panel gives me a message i never saw before:

  • Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.

When i Upload via Webclient it says “a feew seconds” in the blue line but nothing happens. If i try to create a textfile within the webgui, also no chance. Online creating and deleting folders work.

I know that this can mean a lot of things but as i told you, everything worked fine last week. I googled now since hours trying to find a solution without success :frowning:

https://domain/remote.php/webdav/ says:

This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client. < so webdav is still working?

My config is:

‘passwordsalt’ => ‘XXX’,
‘secret’ => ‘XXX’,
‘trusted_domains’ =>
array (
0 => ‘XXX’,
1 => ‘192.168.100.107’,
),
‘datadirectory’ => ‘/media/USBdrive/ncdata’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘14.0.4.2’,
‘overwrite.cli.url’ => ‘XXX’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘ncadmin’,
‘dbpassword’ => ‘XXX’,
‘installed’ => true,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
‘password’ => ‘XXX’,
),
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_from_address’ => ‘cloud’,
‘mail_domain’ => ‘lupfer-weiss.de’,
‘overwriteprotocol’ => ‘https’,
‘maintenance’ => false,
‘logfile’ => ‘/media/USBdrive/ncdata/nextcloud.log’,
‘loglevel’ => ‘0’,
‘log_type’ => ‘file’,
‘mail_smtpauth’ => 1,
‘mail_smtphost’ => ‘XXX’,
‘mail_smtpname’ => ‘XXX’,
‘mail_smtppassword’ => ‘XXX’,
‘skeletondirectory’ => ‘’,
‘updater.release.channel’ => ‘stable’,

The Logfile of nextcloud is empty!!!

I hope anyone can help me, thanks in advance.

Mirko

Please could you check the parameter overwrite.cli.url in your config and see if it has a forward slash at the end of the URL? If not, try adding a forward slash at the end of it.

You could also check the error log of your web server and see if that logs anything at the time of the upload.

Did you do any updates of your PI operating system lately? Tried restarting the web server or the whole PI?

Hi @CFelix ,

thanks for your help. As i told in my starter thread, we did not change anything. I stops working from one day to another. I use a raspberry with nextcloudpi which means that updates were done automatically. possible that a update was done and this causes my problem.

  1. I checked the config.php for the clu.url which is like you told me:

‘overwrite.cli.url’ => ‘https://lupfer-weiss.cloud/’,

  1. I checked etc/apache2/logs and cleared everything, i restartet the server and tried to upload again. i had 4 files now:

error.log:

[Thu Jan 10 08:03:10.005764 2019] [mpm_event:notice] [pid 25845:tid 1992572928] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2q configured – resuming normal operations
[Thu Jan 10 08:03:10.005995 2019] [core:notice] [pid 25845:tid 1992572928] AH00094: Command line: ‘/usr/sbin/apache2’

nc-access.log:

only browsers in it, nothing important

nc-error.log:

[Thu Jan 10 08:03:08.822517 2019] [ssl:error] [pid 25843:tid 1992572928] AH02217: ssl_stapling_init_cert: can’t retrieve issuer certificate! [subject: CN=www.lupfer-weiss.cloud / issuer: CN=GeoTrust RSA CA 2018,OU=www.digicert.com,O=Dig$
[Thu Jan 10 08:03:08.822647 2019] [ssl:error] [pid 25843:tid 1992572928] AH02604: Unable to configure certificate lupfer-weiss.cloud:443:0 for stapling
[Thu Jan 10 08:03:09.041343 2019] [ssl:error] [pid 25845:tid 1992572928] AH02217: ssl_stapling_init_cert: can’t retrieve issuer certificate! [subject: CN=www.lupfer-weiss.cloud / issuer: CN=GeoTrust RSA CA 2018,OU=www.digicert.com,O=Dig$
[Thu Jan 10 08:03:09.041409 2019] [ssl:error] [pid 25845:tid 1992572928] AH02604: Unable to configure certificate lupfer-weiss.cloud:443:0 for stapling

other-vhosts-access.log:

empty

I am wondering about the nc-error.log: Looks like there is a problem with my certificate BUT the certificate works very well. You can see it on https://lupfer-weiss.cloud. No errors. I checked the paths at etc/apache2/sites-available/nextcloud.conf:

DocumentRoot /var/www/nextcloud ServerName lupfer-weiss.cloud CustomLog /var/log/apache2/nc-access.log combined ErrorLog /var/log/apache2/nc-error.log SSLEngine on SSLCertificateFile /etc/apache2/ssl/www.lupfer-weiss.cloud_ssl_certificate.cer SSLCertificateKeyFile /etc/apache2/ssl/www.lupfer-weiss.cloud_private_key.key Options +FollowSymlinks AllowOverride All Dav off LimitRequestBody 0 SSLRenegBufferSize 10486000

Doesn’t see any mistakes…

One strange thing… When i try to upload a pdf then the chrome console says:

core.js?v=ad076de5-26:4 PUT https://lupfer-weiss.cloud/remote.php/webdav/6.pdf 403 (Forbidden)

When i try to upload a larger file wirh around 2 MB it says:

core.js?v=ad076de5-26:4 PUT https://lupfer-weiss.cloud/remote.php/webdav/relax.ai 413 (Request Entity Too Large)

And i still have this in the “Security & setup warnings”:

  • Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.

Maybe i have a permission problem? Maybe the word “forbidden” is caused by that? As i told, downloading anything from the cloud is no problem, also creating folders and deleting folders. but files are the problem. I can add this information if it helps:

pi@nextcloudpi:/media/USBdrive $ ls
ncdata ncp-backups
pi@nextcloudpi:/media/USBdrive $ ls -ld ncdata/
drwxr-x— 1 www-data www-data 246 Jan 9 16:43 ncdata/
pi@nextcloudpi:/media/USBdrive $ stat -c %a ncdata
750
pi@nextcloudpi:/media/USBdrive $

Are these the correct permissions?

I guess all this is caused by the same error somewhere… Please try to help me again with all this information… Thank you

Mirko

This is quite a hard nut to crack, since it was working previously and has changed without you knowing.

As for the permissions, if your Apache user is indeed the www-data this should be ok. Also the 750 should be sufficient enough to write data, as the owner and the group are the same. You could however try and set the permission to 770 recursively, so that both the owner and the group have the same rights.

As for the second error message:

413 (Request Entity Too Large)

This could be some kind of configuration issue in your php.ini - Here is the documentation on how to setup your PHP (https://docs.nextcloud.com/server/14/admin_manual/configuration_files/big_file_upload_configuration.html?highlight=php#configuring-php)

Regarding the WebDav message, not really sure about this one but this could be changed by adding a permanent redirect in your apache config and could look like this:

Redirect 301 /.well-known/carddav https://lupfer-weiss.cloud/remote.php/dav Redirect 301 /.well-known/caldav https://lupfer-weiss.cloud/remote.php/dav

Just add this to the end of your apache.conf in /etc/apache... (or where ever your conf is saved) and reload the webserver.

no, adding these lines also do not help. The Update to NC15 was made automatically with no improvement… I have no idea what to do to solve my problem :frowning:

Did you check your php.ini regarding the upload size and execution time?