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

Files are not loading. Everything else works fine. #12521

Closed
Chicken-DEV opened this issue Nov 18, 2018 · 8 comments
Closed

Files are not loading. Everything else works fine. #12521

Chicken-DEV opened this issue Nov 18, 2018 · 8 comments
Labels

Comments

@Chicken-DEV
Copy link

Chicken-DEV commented Nov 18, 2018

Steps to reproduce

  1. I
  2. Don't
  3. Know

Expected behaviour

I should be able to see all the files, that I uploaded/were generated by Nextcloud.

Actual behaviour

It's just loading. Everything else (settings, apps etc.) works fine.

Server configuration

Operating system: Debian 4.9.130-2

Web server: Apache 2.4.25 nginx/1.13.8

Database: MySQL

PHP version: PHP 7.2.12-1+020181112102304.11+stretch1.gbp55f215

Nextcloud version: 14.03

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: I installed it on my Plesk server using this link: https://download.nextcloud.com/server/installer/setup-nextcloud.php

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory
See https://docs.nextcloud.com/server/14/go.php?to=admin-dir_permissions

Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/14/go.php?to=admin-config

Nextcloud configuration:

Config report
<?php
$CONFIG = array (
  'instanceid' => '*****',
  'passwordsalt' => '*****',
  'secret' => '*****',
  'trusted_domains' => 
  array (
    0 => 'cloud.<IP>.net',
  ),
  'datadirectory' => '/var/www/vhosts/<IP>.net/cloud.<IP>.net/data',
  'dbtype' => 'mysql',
  'version' => '14.0.3.0',
  'overwrite.cli.url' => 'https://cloud.<IP>.net/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '*****',
  'installed' => true,
);

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

Browser: Chrome 70.0.3538.102 /Brave 0.25.2

Operating system: Windows 10

Logs

Web server error log

Web server error log
https://gist.githubusercontent.com/Chicken-DEV/a8ee669e4a505a4eff66cc5d93ac1758/raw/51d6beb67be25a6d91a0b56454b5a6112d424dd2/gistfile1.txt

Nextcloud log (data/nextcloud.log)

Nextcloud log
Ihttps://gist.githubusercontent.com/Chicken-DEV/b426236715227b9a3fe6e84a9465fef5/raw/c4f34a3a36b387dec3c7d5a1a266bce7bb559b78/gistfile1.txt

Browser log

Browser log
core.js?v=b23a5963-0:7 JQMIGRATE: Migrate is installed, version 1.4.0
6Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "font-src 'self'".

(index):1 Failed to load resource: the server responded with a status of 403 ()
client.js?v=b23a5963-0:431 Uncaught (in promise) TypeError: Cannot read property 'getElementsByTagNameNS' of null
    at Client._getSabreException (client.js?v=b23a5963-0:431)
    at client.js?v=b23a5963-0:495
/nextcloud/index.php/apps/firstrunwizard/wizard:1 Failed to load resource: the server responded with a status of 403 ()
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #3488 (File Upload works but can't upload folder), #4219 (Can't share folders by email, files work fine), #4644 (Jumping to file directly is not working), #10770 (Recent Files sometimes don't work), and #5876 ("Allow editing" on a file doesn't work).

@Chicken-DEV
Copy link
Author

I don't know if this will help, but I tried sudo -u www-data php occ files:sca in the nextcloud folder and got this:
Your data directory is invalid

Ensure there is a file called ".ocdata" in the root of the data directory.

Your data directory is not writable

Permissions can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/14/go.php?to=admin-dir_permissions.

An unhandled exception has been thrown:

Exception: Environment not properly prepared. in /var/www/vhosts/.net/cloud..net/nextcloud/lib/private/Console/Application.php:166

Stack trace:

#0 /var/www/vhosts/the-owl.net/cloud..net/nextcloud/console.php(95): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#1 /var/www/vhosts/.net/cloud.net/nextcloud/occ(11): require_once('/var/www/vhosts...')

@j-ed
Copy link
Contributor

j-ed commented Nov 18, 2018

Is it a typo in your configuration that you've written ".nett"in the following parameter although all other parameters are containing ".net"?

'overwrite.cli.url' => 'https://cloud.<IP>.nett/nextcloud',

I think it is worse to check if the error message is telling the truth by checking on the console if your web server user can access the configured data director:

'datadirectory' => '/var/www/vhosts/<IP>.net/cloud.<IP>.net/data',

@Chicken-DEV
Copy link
Author

Chicken-DEV commented Nov 18, 2018

Is it a typo in your configuration that you've written ".nett"in the following parameter although all other parameters are containing ".net"?

The Config seems right. Just a typo here on GitHub.

I think it is worse to check if the error message is telling the truth by checking on the console if your web server user can access the configured data director:

I tried some new Stuff: I set the Owner/Group of the data folder to www-data and now If I set the permission to 777 and try to open the site I get the following error:

Ihr Datenverzeichnis kann von anderen Benutzern gelesen werden

Bitte ändern Sie die Berechtigungen auf 0770, so dass das Verzeichnis nicht von anderen Benutzern angezeigt werden kann.

Which means, your Data folder can be read by other users.
Please change the permission to 0770, so that other users won't be able to see your folder.

And If I set the permission to 0770, I get the error:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

But I can't access the Nextcloud log, because I can't login now and I don't know which other server log there could be...

So I think the problem is the data folder and Nextcloud not being able to access it. I think Nextcloud can't access the www-data user or has its own, which I'm not familiar with.

@kesselb
Copy link
Contributor

kesselb commented Nov 18, 2018

Looks more like a configuration issue to me than a bug with nextcloud. Please use http://help.nextcloud.com/ for your question.

'/var/www/vhosts/<IP>.net/cloud.<IP>.net/data', I guess you use Plesk to manage your websites? If so www-data is wrong.

@Chicken-DEV
Copy link
Author

Yeah I'm using Plesk. This explains a lot. Can you send me the right user?

Thanks so much.

@kesselb
Copy link
Contributor

kesselb commented Nov 19, 2018

The right user depends on your configuration. Usually you setup a user when creating a website. Here some more details about permissions https://docs.plesk.com/en-US/onyx/administrator-guide/web-hosting/website-directory-structure/virtual-host-structure-linux.68806/ and here is an article howto fix wrong permissions https://support.plesk.com/hc/en-us/articles/213910345-How-to-restore-default-permissions-in-the-virtual-host-directory-on-Linux-

@kesselb
Copy link
Contributor

kesselb commented Nov 19, 2018

Please use http://help.nextcloud.com/ for configuration issues.

@kesselb kesselb closed this as completed Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants