[Fixed] Kopano WebApp Files: FilesbackendOwncloud error 412 when sharing files
- 
					
					
					
					
 Sharing files in WebApp Files fails when using the Owncloud-backend: 
 A messagebox “sharing failed” “412” is showing up.The problem exists in both methods: - Share with user/group.
- Share via link
 Versions: 
 WebApp: 3.3.0.439-344.1
 Kopano Core: 8.3.0-694
 Nextcloud: 11.0.1
 PHP-FPM:
 PHP 5.6.30 (fpm-fcgi) (built: Jan 19 2017 22:51:55)[06-Feb-2017 14:53:43] WARNING[06-Feb-2017 14:53:43] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [BACKEND_OWNCLOUD]: SSL extention was set to 1" [06-Feb-2017 14:53:43] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [DBG][FilesBrowserModule] Uncached query! Loading: dcb487feb6f49154d887aabd5e26aaba/umgfoin/ -- n" [06-Feb-2017 14:53:43] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [BACKEND_OWNCLOUD]: [LS] start for dir: umgfoin/" [06-Feb-2017 14:53:43] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [BACKEND_OWNCLOUD]: [LS] done in 0.38389205932617 seconds" [06-Feb-2017 14:53:43] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [DBG][FilesBrowserModule] Checking for shared folders! (/umgfoin/)" [06-Feb-2017 14:53:43] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [BACKEND_OWNCLOUD]: [GETSHARES]: loading shares for folder: /umgfoin/" [06-Feb-2017 14:53:44] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [BACKEND_OWNCLOUD]: [GETSHARES]: connection exception while loading shares: 412 412" [06-Feb-2017 14:53:44] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [BACKEND_OWNCLOUD]: [GETSHARES]: found 1 shares for folder: /umgfoin/" [06-Feb-2017 14:53:44] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [DBG][FilesBrowserModule] Checking for shared took 0.38728380203247 s!" [06-Feb-2017 14:53:44] WARNING: [pool fpm-webmail] child 24534 said into stderr: "NOTICE: PHP message: [DBG][FilesBrowserModule] parsing: /umgfoin/2014-01-26 08.15.05.jpg in base: #R#dcb487feb6f49154d887aabd5e26aaba/umgfoin/"bg, 
 umgfoin.
- 
					
					
					
					
 Hi Umgfoin, Thanks for reporting. 
 I’ve created a ticket here: https://jira.kopano.io/browse/KFP-127
- 
					
					
					
					
 @marty 
 I resently moved from owncloud to nextcloud (removed owncloud und reinstalled nextcloud both from Univention App Center)
 On sharing I get sam 412 error apache log shows:
  so it seems a config problem 
 are there any news about tis ticket ?sharing from the nextcloud web interface works without problem rg 
 Christian
- 
					
					
					
					
 Hi externa1, strange that the requested status.php is in /var/www/owncloud. 
 Did you adjust your webapp configuration?Regards, 
 Björn
- 
					
					
					
					
 @bjoernneumann 
 It’s his server’s apache-log and I suppose, he (or the nextcloud inplace-installer) simply kept the former owncloud-location in HTTP_ROOT when migrating to nextcloud. Thus, nextcloud resides under/var/www/owncloud.Btw., I can provide a nextcloud11-testaccount if this blocks KFP-127. 
 ++umgfoin.
- 
					
					
					
					
 Yes that maybe the case they keep /owncloud. The files owncloud backend uses the status.php to get the version of the instance. See https://stash.kopano.io/projects/KWA/repos/files-owncloud-backend/browse/php/class.backend.php#1037 We will investigate that further. Doesn’t have to be relate to KFP-127 but might be. 
- 
					
					
					
					
 Hi, no that could not be as the nextcloud install is a docker installation on a different new server but webapp resides on the server where also owncloud was installed on. the /var/www/owncloud folder has been removed after ownlcoud uninstallation too rg Chrstian 
- 
					
					
					
					
 We did some research now on this topic. Nextcloud 11 needs a special header for api requests. 
 See https://jira.kopano.io/browse/KFP-127 for details.This also means, that the error with status.php is not related to the 412 http error code. Cheers, 
 Björn
- 
					
					
					
					
 … fixed with commit bafc52a56bf. 
 Verified with files-2.1.0.102 and Nextcloud 11.0.3thanks, 
 ++umgfoin.
