Error syncing owncloud server replied forbidden

Having issues using the desktop client to sync with the server. I can create directories in the local owncloud folder and it will show up on the server but i cannot add any files and get them to sync with the server. I have updated both desktop clients and server versions to the latest stable releases downloaded from owncloud.org

Steps to reproduce

1.add files to local owncloud directory
2.
3.

Expected behaviour

file should upload to server

Actual behaviour

server replied forbidden

Server configuration

Web server:
centos 6.9, whm & cpannel 64.0 build 36
Database:
mariaDB
PHP version:
7.0
ownCloud version: (see ownCloud admin page)
10.0.2
Updated from an older ownCloud or fresh install:
updated have been updating since version 8 i believe
Where did you install ownCloud from:
uploaded zip
Signing status (ownCloud 9.0 and above):
???

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

this produced nothing

The content of config/config.php:
that contains my database password and other private info

i could not generate reports with the methods listed

List of activated apps:
activity gallery calendar

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

i have access to command line though this command does not work: unknown user www-data

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: LDAP/ActiveDirectory/Webdav/...

Client configuration

chrome

Operating system:
windows 10

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

`

www-data is the apache user on debian/ubuntu based distros
for centos sudo -u apache php occ app:list should do the trick.

I guess the ownership of the ownCloud data folder is not correct could verify that?
Who is the owner of the ownCloud/Data folder?

I think it should be this sudo -u seckoracloud php occ app:list as this is the user account on the server in cpanel?

But this doesnt run it gives me a 404 error:

Status: 404 Not Found
Content-type: text/html; charset=UTF-8

No input file specified.

I do believe there is a config error in my server settings somehow, as I just created a new install into a separate directory. and I get the same results.

Anyone? Can I get some help?

try php-cli instead of php

That produces this sudo: php-cli: command not found

I am thinking it might have somethingthing to do with owncloud 10.0.2 as i have other hosting accounts on this server running 9.1.0 just fine with the same enviroment.

Wish i could get some help I have been beating my head against this for two days

Maybe try an environment without Cpanel / WHM and use a recent distro like Debian?

I got it figured out. Mod_Security was not allowing the files to be written.

1 Like

Hi Steve,
I have exactly the same issue. I run ownCloud on a shared hosted server at Justhost.com having cpanel.
I cannot figure out where to change the Mod_Security setting to make it work.
I already tried to disable it in the .htaccess file of the owncloud installation directory.


SecFilterEngine Off
SecFilterScanPOST Off

It doesn't work.

Could you or anyone else tell me a bit more about how you fixed it ?

Thanks in advance.
Hervé

Seems you have found the info how to configure your webserver correctly in https://central.owncloud.org/t/server-replied-forbidden-when-syncing/10617 ?