Can't upload files... just loads but dont upload the file 403 forbidden

Hi there,

I’m with some problems with the OwnCloud, after i’ve made a fresh install, i’ve tunned the server to clean all erros… but after a few hours i can’t upload files… i’m getting 403 forbidden…

Troubleshooted
Folders are 755
Even with the firewall disabled got the error

  1. Login in OwnCloud (fresh install without errors on the backend)
  2. Try to upload files load the file but after that nothing happens.
  3. Response 403 forbiden

Server configuration

Operating system:
CENTOS 7 with WHM/cPanel with CloudLinux installed…

Web server:
Server version: Apache/2.4.41 (cPanel)
Server built: Aug 21 2019 17:11:46

Database:
Server version: 10.2.27-MariaDB-cll-lve MariaDB Server

PHP version:
PHP 7.2.22 (cli)

ownCloud version: (see ownCloud admin page)
version 10.2.1.4

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
subdomain

<?php $CONFIG = array ( 'instanceid' => 'xxx', 'passwordsalt' => 'xxx', 'secret' => 'xxxxxx', 'trusted_domains' => array ( 0 => 'xxx', ), 'datadirectory' => 'xxx/cloud/data', 'overwrite.cli.url' => 'https://cloud.domain.com', 'dbtype' => 'mysql', 'version' => '10.2.1.4', 'dbname' => 'xxxxxx', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'xxxxxx', 'dbpassword' => 'xxxxxx', 'logtimezone' => 'UTC', 'apps_paths' => array ( 0 => array ( 'path' => 'xxx/cloud/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => 'xxx/cloud/apps-external', 'url' => '/apps-external', 'writable' => true, ), ), 'memcache.local' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => 'localhost', 'port' => 6379, ), 'installed' => true, 'mail_domain' => 'xxx', 'mail_from_address' => 'xxx', 'mail_smtpmode' => 'xxx', 'loglevel' => 0, ); ### Client configuration **Browser:** Chrome 77 on Windows 10 **Operating system:** Win10 ### Logs #### Web server error log ``` Insert your webserver log here ``` #### ownCloud log (data/owncloud.log) ``` Insert your ownCloud log here ``` {"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":0,"time":"2019-09-24T19:23:50+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"Joao Moreira","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/settings\/ajax\/checksetup","message":"token xxxxxxxxxxxxxxxxxxxxxxxxxx with token id 2 found, validating"} {"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":0,"time":"2019-09-24T19:23:50+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"Joao Moreira","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/settings\/ajax\/checksetup","message":"token xxxxxxxxxxxxxxxxxxxxxxxxxx with token id 2 found, validating"} {"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":0,"time":"2019-09-24T19:23:51+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"Joao Moreira","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/settings\/admin\/log\/download","message":"token xxxxxxxxxxxxxxxxxxxxxxxxxx with token id 2 found, validating"} {"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":3,"time":"2019-09-24T19:23:51+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"Joao Moreira","app":"PHP","method":"GET","url":"\/index.php\/settings\/ajax\/checksetup","message":"Module 'redis' already loaded at Unknown#0"} {"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":0,"time":"2019-09-24T19:23:51+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"Joao Moreira","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/settings\/admin\/log\/download","message":"token xxxxxxxxxxxxxxxxxxxxxxxxxx with token id 2 found, validating"} {"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":0,"time":"2019-09-24T19:23:51+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"Joao Moreira","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/settings\/admin\/log\/download","message":"token xxxxxxxxxxxxxxxxxxxxxxxxxx with token id 2 found, validating"} {"reqId":"xxxxxxxxxxxxxxxxxxxxxxxxxx","level":0,"time":"2019-09-24T19:23:51+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"Joao Moreira","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/settings\/admin\/log\/download","message":"token xxxxxxxxxxxxxxxxxxxxxxxxxx with token id 2 found, validating"} #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... Failed to load resource: the server responded with a status of 403 (Forbidden) file-upload.js?v=43b8929c72344abfee15b1e7c48f09a7:411 Uncaught TypeError: Cannot read property 'documentElement' of undefined at OC.FileUpload.getResponse (file-upload.js?v=43b8929c72344abfee15b1e7c48f09a7:411) at HTMLInputElement.fail (file-upload.js?v=43b8929c72344abfee15b1e7c48f09a7:1224) at $..._trigger (jquery-ui.custom.js?v=43b8929c72344abfee15b1e7c48f09a7:789) at $..._onFail (jquery.fileupload.js?v=43b8929c72344abfee15b1e7c48f09a7:876) at $..._onFail (jquery-ui.custom.js?v=43b8929c72344abfee15b1e7c48f09a7:405) at Object. (jquery.fileupload.js?v=43b8929c72344abfee15b1e7c48f09a7:910) at j (jquery.js:3099) at Object.fireWith [as rejectWith] (jquery.js:3211) at x (jquery.js:8266) at XMLHttpRequest. (jquery.js:8605) ``` About the folders are 755 even with the firewall disabled still gives me the same error?? Anyone can help me please??

After the deactivation of the modsecurity the problem finally was solved

1 Like