Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

white screen if webserver has no read access to config.php #180

Closed
adsworth opened this issue Jun 20, 2016 · 9 comments · Fixed by #185
Closed

white screen if webserver has no read access to config.php #180

adsworth opened this issue Jun 20, 2016 · 9 comments · Fixed by #185

Comments

@adsworth
Copy link

Steps to reproduce

  1. make sure that config.php is neither readable nor writable by Nextcloud.

Expected behaviour

Nextcloud should complain that it has no access to the config.php

Actual behaviour

no data is returned. the browser page is completely white and there is no html source returned.

Server configuration

Operating system:
Ubuntu
Web server:
Apache
Database:
MySQL
PHP version:
7
Nextcloud version: (see Nextcloud admin page)
9
Updated from an older Nextcloud/ownCloud or fresh install:
update from OC 8.2.5
Where did you install Nextcloud from:
manual install from zip file

List of activated apps:
Enabled:

  • activity: 2.2.1
  • admin_audit: 1.0.0
  • bookmarks: 0.7
  • calendar: 1.2.2
  • comments: 0.2
  • contacts: 1.3.1.0
  • dav: 0.1.6
  • federatedfilesharing: 0.1.0
  • federation: 0.0.4
  • files: 1.4.4
  • files_pdfviewer: 0.8.1
  • files_sharing: 0.9.1
  • files_texteditor: 2.1
  • files_trashbin: 0.8.0
  • files_versions: 1.2.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 14.5.0
  • notifications: 0.2.3
  • provisioning_api: 0.4.1
  • systemtags: 0.2
  • templateeditor: 0.1
  • updatenotification: 0.1.0
    Disabled:
  • encryption
  • external
  • files_external
  • user_external
  • user_ldap

The content of config/config.php:

{
"system": {
"instanceid": "oc80d864d4c2",
"passwordsalt": "_REMOVED SENSITIVE VALUE",
"datadirectory": "/mnt/data/oc_data",
"dbtype": "mysql",
"version": "9.0.50.0",
"dbname": "oc",
"dbhost": "localhost",
"dbtableprefix": "oc
",
"dbuser": "_REMOVED SENSITIVE VALUE",
"dbpassword": "_REMOVED SENSITIVE VALUE
",
"installed": true,
"logfile": "/home/oc/logs/owncloud.log",
"forcessl": false,
"theme": "",
"maintenance": false,
"trusted_domains": [
""_REMOVED SENSITIVE VALUE"",
],
"share_folder": "/Shared",
"loglevel": "1",
"secret": "_REMOVED SENSITIVE VALUE
",
"mail_from_address": ""_REMOVED SENSITIVE VALUE"",
"mail_smtpmode": "php",
"mail_domain": ""_REMOVED SENSITIVE VALUE
"",
"asset-pipeline.enabled": false,
"filesystem_check_changes": 0,
"trashbin_retention_obligation": "auto"
}
}
Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
Firefox
Operating system:
Linux

@MorrisJobke MorrisJobke self-assigned this Jun 20, 2016
@MorrisJobke
Copy link
Member

I will test this tomorrow.

@adsworth
Copy link
Author

in IRC @BernhardPosselt told me this is standard behaviour of PHP if something goes really wrong. So maybe there is nothing we can do about it, but if there is it'd be great. Since nothing is logged in the owncloud.log nor in the apache error.log and if no php log is defined or the user doesn't have access to it then it is really hard to track down the first time. So even if there is nothing we can do about it a note in the docs would be nice.

@MorrisJobke
Copy link
Member

I got this, when I set the config/config.php to read-only. Could you provide the permissions of the config folder and the file config.php in that folder?

bildschirmfoto 2016-06-21 um 09 56 50
(It's german that says, that the permissions are wrong)

@MorrisJobke
Copy link
Member

If the config folder itself is not writeable then it shows this warning:

bildschirmfoto 2016-06-21 um 09 59 11

@adsworth
Copy link
Author

remove the read right as well.
-rw----r-- 1 oc www-data 962 Jun 21 08:09 config.php

my apache runs as www-data.

@MorrisJobke
Copy link
Member

MorrisJobke commented Jun 21, 2016

ah .. reproducible now :) I will try to fix this.

@adsworth
Copy link
Author

I did write "..make sure that config.php is neither readable nor writable ..." :)

@MorrisJobke
Copy link
Member

MorrisJobke commented Jun 21, 2016

I did write "..make sure that config.php is neither readable nor writable ..." :)

Sorry. I haven't red that :(

MorrisJobke added a commit that referenced this issue Jun 21, 2016
* when the config file is not writable there is a error message shown
* same happens now if the config file is not readable
* fixes #180
@MorrisJobke
Copy link
Member

Fix is in #185

MorrisJobke added a commit that referenced this issue Jun 21, 2016
* when the config file is not writable there is a error message shown
* same happens now if the config file is not readable
* fixes #180
@MorrisJobke MorrisJobke added this to the Nextcloud Next milestone Jun 21, 2016
@MorrisJobke MorrisJobke removed their assignment Jun 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants