Server replied "403 Forbidden" to DELETE ..." When Deleting File From ownCloud Desktop Client


#1

Hello everyone,

I receive this error whenever I delete a file within my external storage folder (Dropbox) from the ownCloud desktop client directory. This error does not occur if I delete files from other folders within the ownCloud desktop client. I can also login to the ownCloud web interface and delete the file in the external storage folder with no problems. Would anyone know how I could fix this issue?

Expected behaviour

When I delete a file within the ownCloud desktop client directory it should delete

Actual behaviour

It does not delete

Steps to reproduce

  1. Copied file to external storage folder located within the ownCloud desktop client directory
  2. Deleted said file
  3. ownCloud desktop client does not delete and reports error: "403 Forbidden to DELETE…"

Server configuration

Operating system: Ubuntu 18.04; Kernel: 4.15.0-29-generic

Web server: Apache/2.4.29 (Ubuntu)

Database: maria-db 1:10.1.29-6

PHP version: PHP 7.2.7-0ubuntu0.18.04.2

ownCloud version: ownCloud 10.0.8.5

Storage backend (external storage): Dropbox

Client configuration

Client version: Version 2.4.2 (build 10200)

Operating system: macOS High Sierra Version 10.13.5

OS language: English

Client package (From ownCloud or distro) (Linux only): External Storage: Dropbox 1.0.1

Installation path of client: Macintosh HDD/Applications/owncloud

Logs

This is the only thing that showed up after deleting external storage file from within the ownCloud desktop client in: /var/log/apache2/error.log:

[Wed Jul 25 19:00:36.562249 2018] [autoindex:error] [pid 2799] [client "myip:myport"] AH01276: Cannot serve directory /var/www/owncloud/core/doc/user/_static/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive, referer: https://"myurl".net/core/doc/user/index.html

This showed up in /var/oc_data/owncloud.log…but I see many of these type of: base.php#596" errors!

{"reqId":"eb7bda41-2500-4061-b8f8-61960acbf4b4","level":3,"time":"2018-07-25T15:34:43-04:00","remoteAddr":"myip","user":"--","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/me\/Dropbox\/20130322_163421_001.jpg","message":"ini_set(): A session is active. You cannot change the session module's ini settings at this time at \/var\/www\/owncloud\/lib\/base.php#596"}

Here’s my apache owncloud.conf:

<VirtualHost *:80>
ServerName myurl.net
Redirect permanent / https://myurl.net

</VirtualHost>

<VirtualHost _default_:443>
ServerName myurl.net
DocumentRoot "/var/www/owncloud"
Alias / "/var/www/owncloud/"

<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
   Dav off
 </IfModule>

 <IfModule dir_module>
  DirectoryIndex index.html index.php
 </IfModule>

</Directory>

SSLEngine On
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"
SSLCertificateFile	/etc/ssl/certs/myurl_net.crt
SSLCertificateKeyFile   /etc/ssl/private/myurl_net.key
SSLCACertificateFile    /etc/ssl/certs/myurl_net.ca-bundle

<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>

</VirtualHost>

#2

I’m often reading that you need to do a “file scan” via the occ command line tool when moving files around behind ownClouds “back”. Maybe this could help you?


#3

Hey Tom,

Thanks for the reply. I’m not doing anything behind ownCloud’s “back”. I’m deleting these files via the ownCloud Desktop Client directory. There’s a folder in the ownCloud Desktop Client directory named Dropbox that is linked to my Dropbox External Storage. Sorry if my original post was not clear.


#4

Ah, i think i understand now. :slightly_smiling_face:

Maybe you can update to the recently released version 10.0.9 and try again?

From what i know PHP 7.2 support is only a “tech preview” since version 10.0.5, maybe there are still issues with ownCloud itself or the Dropbox app from the marketplace?


#5

It appears the ownCloud 10.0.9 update is only available via the Daily repository and has not made it into the Stable repository yet. That makes me a little nervous but I’m running ownCloud as a Proxmox VM so I could make a backup, update ownCloud and if anything goes wrong then I could restore the backup. I was told PHP 7.2 was in “tech preview” from a previous post but it was the only version available in the Ubuntu 18.04 repository and the only way I could install PHP 7.1 was to add a PPA or build from source which I’m not a fan of…especially building from source as you can always expect problems. I hope I didn’t shoot myself in the foot by installing PHP 7.2 but I will give the update a try!


#6

Hey,

i had chosen the manual install way for my ownCloud setup. It seems this was a good choice and i don’t have to wait for the repositories or the updater app to get the updates. Seems both have some sort of delay as 10.0.9 was releases as “stable” last week:


#7

Sounds good, I will try the manual install here in the next week or so when I get some free time and see what happens.


#8

Hey Tom,

I finally got around to upgrading ownCloud to 10.0.9.5 but the error still occurs when I delete the file. However, I noticed the error does eventually disappear from the ownCloud Desktop Client “Not Synced” log and if I login into my Dropbox account the file has been deleted. So it is technically working but it’s annoying the error window always pops up on the ownCloud Desktop Client. I wonder if ownCloud is timing out before the file can be deleted on Dropbox’s end?


#9

You shouldn’t configure the desktop client for syncing with external storage on other services. It’s not supported.


#10

Why is an option for external storage available in the ownCloud desktop client as shown by the: “Ask for confirmation before synchronizing external storages”? Why would the developers put that option there if external storage is not supported within the ownCloud desktop client? Seems kind of counterintuitive in my opinion.


#11

I understand what you mean and I agree with you. It’s really misleading.


#12

Do you know if there would be an issue synchronizing external storage through WebDAV? More specifically using ownCloud’s WebDAV as a mapped drive in Windows Explorer and then adding and deleting data on the external storage through that?


#13

In short: No, I don’t know.

For my understanding, “unsupported” means, maybe works, maybe not, as each external storage provider is cooking its own soup. Be prepared to have sync conflicts and so on.


#14

Okay, thank you for the feedback!