Problem with trusted_domains

9.1.x

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. install OC serveur on ubuntu 16.04
2. installa and configure OC basicaly (first user, first pwd)
3. launch OC over the web browser and login

Expected behaviour
Tell us what should happen

Actual behaviour

I can't loggin into my owncloud installation in a browser other than the server web browser. when a try from a other PC on a local host, i have this message

this is the configuration of my config.php

$CONFIG = array (
  'instanceid' => 'oc46m1pmfamr',
  'passwordsalt' => 'zt3rbPjPM00vRakUGqVZTB8Gokzztp',
  'secret' => 'xuvN/GCakDmKotOafxwHgkMdvqtOIrkk9Uh+J5nzWL7+zTKF',
  'trusted_domains' => 
  array (
    0 => '192.168.0.100:80',
    1 => '154.72.161.189',
    2 => '192.168.0.100:3000',
    3 => '192.168.0.108',
    4 => '192.168.0.106',
    5 => '192.168.0.100',
    6 => '192.168.0.118',
    7 => 'server.dev',
  ),
  'datadirectory' => '/var/www/html/owncloud/data',
  'overwrite.cli.url' => '192.168.0.100/owncloud',
  'dbtype' => 'mysql',
  'version' => '9.1.2.5',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'root',
  'dbpassword' => 'madiaroot',
  'logtimezone' => 'UTC',
  'installed' => true,
  'loglevel' => 0,

but when i run owncloud with php as server (inside owncloud folder)

php -S 0:3000

the installation work fine

Server configuration
Operating system: Ubuntu Linux 16.04
Web server: Server version: Apache/2.4.18 (Ubuntu), Server built: 2016-07-18T18:32:02
Database: MySQL 5.7
PHP version: PHP 7.0.15-0ubuntu0.16.10.4 (cli) ( NTS )
ownCloud version : ownCloud 9.1.2 (stable)
Updated from an older ownCloud or fresh install: fresh Install
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

ownCloud log (data/owncloud.log)

{"reqId":"JW1qigFeuS3r0HlWFVsM","remoteAddr":"127.0.0.1","app":"PHP","message":"mkdir(): Permission denied at \/var\/$
{"reqId":"JBPV7BoRHHsw8CMTeSgy","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted $
{"reqId":"JBPV7BoRHHsw8CMTeSgy","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted $
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted$
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted$
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted$
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted$
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted$
{"reqId":"0YAIeZfWkq6ySR3KG0Lw","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted $
{"reqId":"l4r494drhhse346vYmwA","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted $
{"reqId":"NJv\/oPnuzguBjed9mURD","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted$

{"reqId":"JW1qigFeuS3r0HlWFVsM","remoteAddr":"127.0.0.1","app":"PHP","message":"mkdir(): Permission denied at \/var\/www\/html\/owncloud\/lib\/private\/Setup.php#288","level":3,"time":"2016-11-25T16:43:39+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}
{"reqId":"JBPV7BoRHHsw8CMTeSgy","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/Config.php#232","level":3,"time":"2017-01-23T14:52:00+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}
{"reqId":"JBPV7BoRHHsw8CMTeSgy","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/Config.php#232","level":3,"time":"2017-01-23T14:52:00+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/Config.php#232","level":3,"time":"2017-01-23T14:53:13+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/Config.php#232","level":3,"time":"2017-01-23T14:53:13+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/Config.php#232","level":3,"time":"2017-01-23T14:53:13+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/Config.php#232","level":3,"time":"2017-01-23T14:53:35+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}
{"reqId":"CD\/zJ+rVKWFSFIH53xqz","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/Config.php#232","level":3,"time":"2017-01-23T14:53:36+00:00","method":"POST","url":"\/owncloud\/index.php","user":"yannick"}
{"reqId":"0YAIeZfWkq6ySR3KG0Lw","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php#920","level":3,"time":"2017-01-23T14:53:50+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/","user":"yannick"}
{"reqId":"l4r494drhhse346vYmwA","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php#920","level":3,"time":"2017-01-23T14:53:50+00:00","method":"GET","url":"\/owncloud\/index.php\/core\/js\/oc.js?v=65d56d2e6ca5c46fa03adc731692e1e5","user":"yannick"}
{"reqId":"NJv\/oPnuzguBjed9mURD","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php#920","level":3,"time":"2017-01-23T14:53:50+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"yannick"}
{"reqId":"9WDCOeWnFWKJ\/hrcT5nl","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php#920","level":3,"time":"2017-01-23T14:54:21+00:00","method":"GET","url":"\/owncloud\/index.php","user":"yannick"}
{"reqId":"xB67Y0bf3hz\/iyYUoqvx","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php#920","level":3,"time":"2017-01-23T14:54:21+00:00","method":"GET","url":"\/owncloud\/index.php\/core\/js\/oc.js?v=65d56d2e6ca5c46fa03adc731692e1e5","user":"yannick"}
{"reqId":"yguJR3CBcgAJ77JIb5GW","remoteAddr":"192.168.0.105","app":"PHP","message":"chmod(): Operation not permitted at \/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php#920","level":3,"time":"2017-01-23T14:54:21+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"yannick"}
{"reqId":"DwD9PyumCO56eMiuxwt7","remoteAddr":"192.168.0.106","app":"core","message":"Login failed: 'root' (Remote IP: '192.168.0.106')","level":2,"time":"2017-03-15T09:41:25+00:00","method":"POST","url":"\/index.php\/login","user":"--"}
{"reqId":"hEk76XgAS5o8M2ON6DsW","remoteAddr":"192.168.0.106","app":"core","message":"Could not get application: cURL error 28: Operation timed out after 20000 milliseconds with 0 out of 0 bytes received","level":3,"time":"2017-03-15T10:28:43+00:00","method":"POST","url":"\/index.php\/settings\/ajax\/enableapp.php","user":"yannick"}
{"reqId":"rXDmHp8csAegIN+NlJgJ","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'root' (Remote IP: '127.0.0.1')","level":2,"time":"2017-03-15T11:29:43+00:00","method":"POST","url":"\/index.php\/login","user":"--"}
{"reqId":"ddR\/aYINlkAHEhZckM5r","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:30:47+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"hrCUOW2ESnjTL0ac1WO\/","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:30:49+00:00","method":"GET","url":"\/","user":"--"}
{"reqId":"XBVyrLF8YhTHAtmsWnFQ","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:30:49+00:00","method":"GET","url":"\/index.php\/core\/js\/oc.js?v=1dd4b3e28d33cbccfb30fd34aefd3f09","user":"--"}
{"reqId":"8HfvYxedpdZIxhmkfhvU","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:30:49+00:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"b1y+UabrCF3AABUrce\/5","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:31:18+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"MoyNOrRvrdu\/a4NMplOM","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:31:43+00:00","method":"GET","url":"\/","user":"--"}
{"reqId":"9LouOBXDdAmCtLXtuW6n","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:31:43+00:00","method":"GET","url":"\/index.php\/core\/js\/oc.js?v=1dd4b3e28d33cbccfb30fd34aefd3f09","user":"--"}
{"reqId":"MgS5nAmvtb\/tboNLPOhm","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:31:43+00:00","method":"GET","url":"\/cron.php","user":"--"}
{"reqId":"M5hQx++FIg633WpMIw78","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:31:50+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"hmMWryHMV9hdvRimWcMJ","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:32:22+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"PoCe8jCLPbF0PoNeofqJ","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:32:54+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"xDBiOeEOHRm5v0Fm7xDC","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:33:26+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"7jQl\/rIYKbK\/P9ZEaTky","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:33:58+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"Qdb1MUpxJPweDKF0qbFL","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:34:30+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"ydGjPLQImYlBDPMv4VHx","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:35:02+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"AGxPwm7pjL\/e5\/Yihu86","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:35:34+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"0Zjoq8SbM1gUen\/VSiEi","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:36:06+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"N87ayLm\/bPfS2EiQPMFX","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:36:38+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"DJV3DyEOfUa8TztKme1X","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:37:10+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"tjHeKZ67Ler7UA9r\/J5U","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:37:42+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"fymsxIiAJG7djW1wTZE6","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:38:14+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"CRESMy4ixwDXaxVvbouz","remoteAddr":"192.168.0.106","app":"core","message":"Trusted domain error. \"192.168.0.106\" tried to access using \"192.168.0.100:3000\" as host.","level":2,"time":"2017-03-16T12:38:46+00:00","method":"GET","url":"\/status.php","user":"--"}
{"reqId":"fugCh5FMMKjjLDmTnYPj","remoteAddr":"192.168.0.106","app":"core","message":"Login failed: 'root' (Remote IP: '192.168.0.106')","level":2,"time":"2017-03-16T12:44:49+00:00","method":"POST","url":"\/index.php\/login","user":"--"}
{"reqId":"cAuaS7C2rJVqcuSfUhz6","remoteAddr":"192.168.0.106","app":"core","message":"Login failed: 'madia' (Remote IP: '192.168.0.106')","level":2,"time":"2017-03-16T14:01:57+00:00","method":"POST","url":"\/index.php\/login","user":"--"}
{"reqId":"ZJ3L5Y87SNq\/Xvwcyq9G","remoteAddr":"192.168.0.108","app":"core","message":"Login failed: 'madia' (Remote IP: '192.168.0.108')","level":2,"time":"2017-03-16T14:54:12+00:00","method":"POST","url":"\/index.php\/login","user":"--"}
{"reqId":"w6mmSnToh7wBPTKvtYOd","remoteAddr":"192.168.0.108","app":"core","message":"Login failed: 'madia' (Remote IP: '192.168.0.108')","level":2,"time":"2017-03-16T14:54:16+00:00","method":"POST","url":"\/index.php\/login?user=madia","user":"--"}
{"reqId":"loVxu+E3SNXAmeW6FDOk","remoteAddr":"192.168.0.108","app":"core","message":"Login failed: 'madia' (Remote IP: '192.168.0.108')","level":2,"time":"2017-03-16T14:55:10+00:00","method":"POST","url":"\/index.php\/login?user=madia","user":"--"}
{"reqId":"NREoututZcgncWv48fhz","remoteAddr":"192.168.0.108","app":"core","message":"Login failed: 'root' (Remote IP: '192.168.0.108')","level":2,"time":"2017-03-16T14:55:15+00:00","method":"POST","url":"\/index.php\/login?user=madia","user":"--"}
{"reqId":"DxDrsEHQu6NAQjrpuoTF","remoteAddr":"192.168.0.108","app":"core","message":"Login failed: 'root' (Remote IP: '192.168.0.108')","level":2,"time":"2017-03-16T14:55:21+00:00","method":"POST","url":"\/index.php\/login?user=root","user":"--"}
{"reqId":"8aGaycJGC5vZGI36n8I4","remoteAddr":"192.168.0.108","app":"core","message":"Login failed: 'root' (Remote IP: '192.168.0.108')","level":2,"time":"2017-03-16T14:55:25+00:00","method":"POST","url":"\/index.php\/login?user=root","user":"--"}
{"reqId":"S8f\/Z3qBlDD86Xfg2NGQ","remoteAddr":"192.168.0.108","app":"core","message":"Login failed: 'madia' (Remote IP: '192.168.0.108')","level":2,"time":"2017-03-16T14:55:34+00:00","method":"POST","url":"\/index.php\/login?user=root","user":"--"}

Integrity status for oC9+

No errors have been found.

#2

Your trusted_domains settings doesn't look right. Have a look at the documentation at [1].

To sum-up: The trusted_domains setting needs to contain the IP/Domain of your server (the part you're putting into your browser), not of the clients accessing the server

[1] https://doc.owncloud.org/server/latest/admin_manual/installation/installation_wizard.html#trusted-domains


#3

Thanks for your answer.
my local server IP adress is 192.168.0.100, but when i put this IP adress, i have the same problem.

Thanks


#4

okay, this documentation is pretty vague. I’m putting this here for future reference.

The “trusted_domain” is the FQDN of your server. A better example for the documentation would be:

1=> ‘myserver.mydomain.org’,
2=> ‘10.0.1.10’, <- where this is the IP of your server.