Desktop Client Error : Server replied "406 Not Acceptable" to PUT

Nextcloud version (eg, 12.0.2): 14.0.6
Operating system and version (eg, Ubuntu 17.04): Win 10
Desktop Client: Version 2.5.1final (build 20181204)
Apache or nginx version (eg, Apache 2.4.25): unsure
PHP version (eg, 7.1): PHP 7.0

The issue you are facing:
Some files not synced from PC client to cloud, display error

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Some Files simply not synced

ERROR from desktop client:

parth/to/myfile.jpg: Sever replied "406 Not Acceptable" to
 "PUT http://cloud.mydomain.com/remote.php/dav/uploads/myname/1068692594/00000000" 

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocaq1tzkvxau',
  'passwordsalt' => 'bSRnrIXBS6BcSo8PX2vyohfgvE2owb',
  'secret' => 'D7EW/m7b4VKil8U1btiTX9Nse5myyqwjCmTL2OLoMJEC9Ghf',
  'trusted_domains' => 
  array (
    0 => 'www.mydomain.com',
    1 => 'cloud.mydomain.com',
  ),
  'datadirectory' => '/home3/aforadri/public_html/cloud/data',
  'overwrite.cli.url' => 'http://www.mydomain.com/cloud',
  'dbtype' => 'mysql',
  'version' => '14.0.6.0',
  'dbname' => 'myname',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'myname_cloudu',
  'dbpassword' => 'mypassword',
  'installed' => true,
  'updater.secret' => '$2y$10$UVm6zm1RVWMunfOHl2EWz.TyEOlcOvKKK7sJNnl9x.3PfvWCSDlOO',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => 'admin',
  'mail_smtpmode' => 'php',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'aforadrian.com',
  'filelocking.enabled' => true,
);

The output of your Apache/nginx/system log in /var/log/____:

not sure how to get this

You posted somewhere else the same:

Don’t do that without sharing links. Otherwise it is a waste of our time.

Have you searched the web regarding ‘Nextcloud’ and 406?
You get plenty of results.

See https://github.com/owncloud/client/issues/6418

As OS you said Windows 10? This is for the client or? What about the server?

Are you on a Shared hosting service?

Sorry, I asked similar questions on OwnCloud forum and the post got pulled. Admin says it’s an NextCloud issue… so I gotta ask again here looking for answers.

Win 10 is the OS for my client, for server I am not sure I m using a shared hosting service but on a Virtual Private Server with separated IP on Linux.

What more links can I provide to help clarify this? I just changed my domain name into place holders, if needed I can change it back, just thought it could be insecure.

Some file got synced and some dont, and the problem occurs only on the uploading part. The problem seemed to hv sth to do with remote.php.

I am quite new to this, I hv search everything from owncloud, it some said to change “env.var” but I do not know how to change it, I cannot see this file in my installation folder on my PC nor on my host server.

I hv updated the host and client both to latest versions.

As you can read in other search results this is may have to do with limitations of shared hosting providers.

Never had this personally on any odroid or raspberry systems. Had no trouble with a few shared hosting installations as well.

Settings environment variables differ on different platform. Use the internet search for this.

I cannot provide any further help on this.

@Adrian_Li I think it might be a Bluehost issue. I’ve been having the same issue when I was using Owncloud and still there after I migrated to Nextcloud. I’ve been using the Mac OS X desktop client for both and still having the issue. I’m using Bluehost shared hosting as well.

“However”… I think it has something to do with the version of apache they’re using and something to do with HTTP/2 with the desktop client. Uploading via Web interface and IOS client seems to work. Same for you?

yes the web interface works.
Did u solve the problem and ask about the apache version? I wonder if i can know what is wrong and if changing my hosting plan might help perhaps…
Problem is that I am syncing quite a large amount of files and doing so on web interface seemed troublesome. I might as well use an FTP client to upload things for backup instead…

I still don’t understand why some file can be synced and some don’t. It doesn’t seemed to be about file size limit or file formats, which is weird. It just look random, but once a file failed to sync the same file will fail forever.

Contrary to their use of “unlimited” storage, it’s a fib. The disk utilization is limited to the average of others on the same server as you. And the count of how many files you have is also restricted and monitored. Yeah, it’s kind of bull.

As for the odd ball files not being synced… The files that get transfered over to the server are stored in a “temp” location and are scanned before you actually see them. If the file is malformed or flagged at some point the the checksum gets tagged and blocks files with that checksum. Trust me, I’ve tried doing stuff like renaming them and what not and it still gets blocked. I have a feeling this some part of their attempt from allowing malicious software on their systems, but will tag files as false positives. You’ll have to talk to someone on the tier 3 to work it out. Which you’ll want to avoid. Having something like Nextcloud on the shared hosting violates the terms of service. However, if you get the VPS or dedicated plan it’s okay. Also by upgrading you get more control over which version of apache and PHP you’re running.