Server replied: Forbidden when syncing

I'm a newbie on owncloud. I just installed it on a shared hosted server.
When I tried to start the first sync, the folders are correctly uploaded but all the files upload are getting a "Server replied: Forbidden" error.

I suspect that it comes from a security restriction on the hosted server. I already tried to disable Mod_Security in the /.htaccess like that

<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off

Maybe Mod_Security is not overwritable on my shared server.

Do you have any advise either to disable Mod_Security or to make it work by-pass/workaround this issue ?

Thanks in advance for you help.

Steps to reproduce

  1. Start sync on local Windows

Expected behaviour

The files should upload to the server.

Actual behaviour

The directories are correctly created on the server. The files are not uploaded. The server returns an error "Server replied: forbidden".

Server configuration

Operating system: Linux 3.10.0-614.10.2.lve1.4.50.el6h.x86_64 on a shared server served by and using cpanel.

Web server: Apache 2.2.34

Database: MySQL 5.6.32-78.1

PHP version: 5.6.32

ownCloud version: ownCloud 10.0.3 (stable)

Updated from an older ownCloud or fresh install: Fresh

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):

Technical information
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix

- core
		- 400.shtml
		- favicon.ico
		- setup-owncloud.php
		- 500.shtml
		- 401.shtml
		- 500.php
		- 404.shtml
		- 403.shtml

Raw output
    [core] => Array
            [EXTRA_FILE] => Array
                    [400.shtml] => Array
                            [expected] => 
                            [current] => e413082e474ff14f138c301d618e205b9152132139169296435294d101ccd03e3a84ef049c124560e2fa3ec38539bed22e369631facfd87ad22fb633adedf568

                    [favicon.ico] => Array
                            [expected] => 
                            [current] => fa5b109926a5c3fb14ccaefce0fc08094f5e36f9808df2956eb32409927add449ec7bd52e2cc1c968567df058473a351ff8136a5b5d6a7d5be978efda81c1c12

                    [setup-owncloud.php] => Array
                            [expected] => 
                            [current] => dd6befee4343141cfe812a8bb6865a54dbaff79f7d8dce1f7b9f9ed4fae606f53e72b10e9136945dfbe723d718b3c47586c36557fb73115d87b7a7e53865f872

                    [500.shtml] => Array
                            [expected] => 
                            [current] => 06240884826c4445093a92939e641092d8be0c5abf47bfbe87908277d4485b076b0d200928ec4a6f4d52def2412a9e4267c543f3515b2d0be541950f55d2cad2

                    [401.shtml] => Array
                            [expected] => 
                            [current] => 4119d9546bacdbce999b3afdffd6cb4c4e46c7b035396fa18f3fc314d0c40215c3630028eb89f6dad981f5d32558ebbb7a828572dc7301f091a30423c2448b77

                    [500.php] => Array
                            [expected] => 
                            [current] => bfc5c01a79316c59e8f3d9519800a01b6f823fe5885ab3f04846cefe95f99d099c53388d91234ea6ebe437d4589195e3475f4d2dec238c8fc002653ffde3e404

                    [404.shtml] => Array
                            [expected] => 
                            [current] => 555b2563d89db0259a148a057acb169f4cfc0371fea9f839c72ddc913e36fef0a6c4d389bd5b838dec1dfe486b3a06d2f5ad3883ca496deed32f1d84a33aac69

                    [403.shtml] => Array
                            [expected] => 
                            [current] => 56f2eb2ac8290f183e5a5929fa1db5a96ac56dbc8cbc2e95da6d9c7c6314014813f7d3e6f12c35978dc946bc0ad4893ae3177c49a0d987199b207c75b50c9635




The content of config/config.php:

Unable to access "Generate Config report" :-(.
I went to /index.php/settings/admin?sectionid=additional but the page is completely blank.

List of activated apps:

No more apps than on a fresh installation.

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: no

Client configuration

Operating system: Windows 10


Web server error log

access.log - - [29/Nov/2017:14:47:29 -0700] "PROPFIND /remote.php/dav/files/herve/ HTTP/1.1" 207 1248 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)" - - [29/Nov/2017:14:47:32 -0700] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1032 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" - - [29/Nov/2017:14:47:36 -0700] "PROPFIND /remote.php/dav/files/herve/ HTTP/1.1" 207 1304 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)" - - [29/Nov/2017:14:47:41 -0700] "PROPFIND /remote.php/dav/files/herve/ HTTP/1.1" 207 1268 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)" - - [29/Nov/2017:14:47:45 -0700] "PROPFIND /remote.php/dav/files/herve/ HTTP/1.1" 207 1919 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)" - - [29/Nov/2017:14:47:46 -0700] "PUT /remote.php/dav/files/herve/Mariage%20Ales/Nouvelle%20image%20bitmap.bmp HTTP/1.1" 403 2213 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)" - - [29/Nov/2017:14:47:47 -0700] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1032 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" - - [29/Nov/2017:14:48:02 -0700] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1032 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36" - - [29/Nov/2017:14:48:02 -0700] "GET /ocs/v1.php/cloud/activity?page=0&pagesize=100&format=json HTTP/1.1" 200 934 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)" - - [29/Nov/2017:14:48:13 -0700] "PROPFIND /remote.php/dav/files/herve/ HTTP/1.1" 207 1268 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)" - - [29/Nov/2017:14:48:15 -0700] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1032 "-" "Mozilla/5.0 (Windows) mirall/2.3.4 (build 8624)"

ownCloud log (data/owncloud.log)

Nothing since owncloud is actually not called.

Well, I understood and found the solution. :smile:

I fact the "PUT" was not allowed on my apache configuration.
So I enabled it like like that in the installation-dir/.htaccess

  Allow from all

Now everything works like a charm.

So happy.
Thank you for this wonderful opensource project !

I think there are even more of these methods needed for a correctly working ownCloud.


I was wondering if someone could explain me how hguidetti was able to solve the issue. Within unRAID I have installed ownCloud in a Docker. Now errors appear in a client something like this "ownCloud,Server replied “403 Forbidden” to “PUT
Would someone be able to explain me how I might edit this file through command line or where i might find the responsible file. And second are there any other things I might need to do to resolve this 403 error?


i think the related info was posted at by @hguidetti above in a generic way. From my experience this differs between all the different variants of operating systems out there so i’m not sure if there could be a step by step guide posted without knowing your operating system :confused:

Disabling the Antivirus solved the problem. This allowed a reconfiguration of the Antivirus and solved the issue.

1 Like